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

use correct size to hex decode salt

This fixes "stack smashing detected" (Issue #26)
This commit is contained in:
Christian Hesse 2013-09-19 14:39:44 +02:00
parent 96cf010af7
commit c41995c5f3

2
util.c
View File

@ -269,7 +269,7 @@ load_chalresp_state(FILE *f, CR_STATE *state, bool verbose)
challenge_hex, response_hex, salt_hex, iterations, slot));
}
yubikey_hex_decode(state->salt, salt_hex, sizeof(state->challenge));
yubikey_hex_decode(state->salt, salt_hex, sizeof(state->salt));
state->salt_len = strlen(salt_hex) / 2;
} else {
rewind(f);