Skip to content

Commit 34122f6

Browse files
committed
[crypto] Fixed aes_gcm uninitialized output_len pointer
Signed-off-by: Lucas Baizer <lucasallenbaizer@gmail.com>
1 parent f7ad566 commit 34122f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sw/device/lib/crypto/impl/aes_gcm/aes_gcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ static status_t aes_gcm_gctr(const aes_key_t key, aes_block_t *iv,
131131
// Not enough data for a full block; copy into the partial block.
132132
unsigned char *partial_bytes = (unsigned char *)partial->data;
133133
memcpy(partial_bytes + partial_len, input, input_len);
134+
*output_len = 0;
134135
} else {
135136
// Construct a block from the partial data and the start of the new data.
136137
unsigned char *partial_bytes = (unsigned char *)partial->data;

0 commit comments

Comments
 (0)