Skip to content

Commit 797b371

Browse files
authored
CDRIVER-4694 calculate payload length for kms_request_append_payload() (#1346)
This fixes an assert failure during MONGODB-AWS auth when an application is bundled with both libmongoc and libmongocrypt, and libmongocrypt's KMS library is used.
1 parent 75db6e1 commit 797b371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libmongoc/src/mongoc/mongoc-cluster-aws.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ _client_second (mongoc_cluster_t *cluster,
12421242
AUTH_ERROR_AND_FAIL ("Failed to parse server nonce");
12431243
}
12441244

1245-
if (!kms_request_append_payload (request, body, -1)) {
1245+
if (!kms_request_append_payload (request, body, strlen(body))) {
12461246
AUTH_ERROR_AND_FAIL ("Failed to append payload");
12471247
}
12481248

0 commit comments

Comments
 (0)