From 57a6458051d5ef9572386f486a23d3117d385514 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Sun, 25 Aug 2024 20:58:14 +0200 Subject: [PATCH] Fix unitialized var. Signed-off-by: Pol Henarejos --- src/openpgp/openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openpgp/openpgp.c b/src/openpgp/openpgp.c index 76631bf..dfa5015 100644 --- a/src/openpgp/openpgp.c +++ b/src/openpgp/openpgp.c @@ -1078,7 +1078,7 @@ static int cmd_change_pin() { if (!tf) { return SW_REFERENCE_NOT_FOUND(); } - uint8_t def[IV_SIZE + 32 + 32 + 32 + 32]; + uint8_t def[IV_SIZE + 32 + 32 + 32 + 32] = {0}; memcpy(def, file_get_data(tf), file_get_size(tf)); if (P2(apdu) == 0x81) { hash_multi(apdu.data + pin_len, apdu.nc - pin_len, session_pw1);