Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libmongoc/src/mongoc/mongoc-cyrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ _mongoc_cyrus_canon_user(sasl_conn_t *conn,

// `inlen` is a string length (excluding trailing NULL).
// Cyrus-SASL passes an `out` buffer of size `out_max + 1`. Assume `out_max` is the max to be safe.
if (inlen + 1 >= out_max) {
unsigned inlen_1 = 0;
if (mlib_add(&inlen_1, inlen, 1) || inlen_1 + 1 >= out_max) {
MONGOC_ERROR("SASL username too large");
return SASL_BUFOVER;
}
Expand Down