diff --git a/pkcs11/tests/meta_object_test.c b/pkcs11/tests/meta_object_test.c index c38a9b49..6c5d6508 100644 --- a/pkcs11/tests/meta_object_test.c +++ b/pkcs11/tests/meta_object_test.c @@ -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);