From 34122f65271c40153c5afa031c9df599606e404f Mon Sep 17 00:00:00 2001 From: Lucas Baizer Date: Mon, 21 Jul 2025 13:29:05 -0700 Subject: [PATCH] [crypto] Fixed aes_gcm uninitialized output_len pointer Signed-off-by: Lucas Baizer --- sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c b/sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c index b2f982cbf23d4..5274c968a3012 100644 --- a/sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c +++ b/sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c @@ -131,6 +131,7 @@ static status_t aes_gcm_gctr(const aes_key_t key, aes_block_t *iv, // Not enough data for a full block; copy into the partial block. unsigned char *partial_bytes = (unsigned char *)partial->data; memcpy(partial_bytes + partial_len, input, input_len); + *output_len = 0; } else { // Construct a block from the partial data and the start of the new data. unsigned char *partial_bytes = (unsigned char *)partial->data;