Skip to content

Commit 9d09b05

Browse files
authored
Merge pull request #199 from padelsbach/wp_aesgcm_uninit_variable
Fix uninitialized variable in aesgcm
2 parents 8352093 + 6d00607 commit 9d09b05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wp_aes_aead.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,12 +1559,13 @@ static int wp_aesgcm_cipher(wp_AeadCtx *ctx, unsigned char *out,
15591559
size_t *outLen, size_t outSize, const unsigned char *in, size_t inLen)
15601560
{
15611561
int ok = 1;
1562-
size_t finalLen;
1562+
size_t finalLen = 0;
15631563

15641564
if (!wolfssl_prov_is_running()) {
15651565
ok = 0;
15661566
}
15671567
if (ok) {
1568+
*outLen = 0;
15681569
if (in != NULL) {
15691570
ok = wp_aesgcm_stream_update(ctx, out, outLen, outSize, in, inLen);
15701571
}

0 commit comments

Comments
 (0)