Skip to content

Commit

Permalink
PKCS11: meta_objects: Fix potential bufferoverflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Apr 27, 2023
1 parent 1b83e06 commit 095a0d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkcs11/tests/meta_object_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static CK_SESSION_HANDLE open_test_session(char *password) {
}
char config[256];
assert(strlen(connector_url) + strlen("connector=") < 256);
sprintf(config, "connector=%s", connector_url);
snprintf(config, sizeof(config), "connector=%s", connector_url);
initArgs.pReserved = (void *) config;
CK_RV rv = p11->C_Initialize(&initArgs);
assert(rv == CKR_OK);
Expand Down

0 comments on commit 095a0d1

Please sign in to comment.