Skip to content

Commit

Permalink
Fix potential memory leak
Browse files Browse the repository at this point in the history
Fixup of 97edea3

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
  • Loading branch information
sjaeckel committed Feb 25, 2024
1 parent 7e863d2 commit 1777e6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/encauth/ccm/ccm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ int ccm_memory(int cipher,
}
for (; y < L; y++) {
if (x >= sizeof(PAD)) {
return CRYPT_INVALID_ARG;
err = CRYPT_INVALID_ARG;
goto error;
}
PAD[x++] = (unsigned char)((len >> 24) & 255);
len <<= 8;
Expand Down

0 comments on commit 1777e6d

Please sign in to comment.