1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-26 21:54:15 +01:00

Fix memset() with wrong size as reported by clang

This commit is contained in:
Clemens Lang 2012-01-28 00:19:24 +01:00
parent 73369beba9
commit 126146d0e3

2
util.c
View File

@ -153,7 +153,7 @@ int challenge_response(YK_KEY *yk, int slot,
if (res_size < sizeof(64 + 16)) if (res_size < sizeof(64 + 16))
return 0; return 0;
memset(response, 0, sizeof(response)); memset(response, 0, res_size);
if (verbose) { if (verbose) {
fprintf(stderr, "Sending %i bytes %s challenge to slot %i\n", len, (hmac == true)?"HMAC":"Yubico", slot); fprintf(stderr, "Sending %i bytes %s challenge to slot %i\n", len, (hmac == true)?"HMAC":"Yubico", slot);