Skip to content

Commit 9f020b1

Browse files
committed
limit malloc'ed data in eax_decrypt_verify_memory()
1 parent 05f7393 commit 9f020b1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/encauth/eax/eax_decrypt_verify_memory.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ int eax_decrypt_verify_memory(int cipher,
5555
/* default to zero */
5656
*stat = 0;
5757

58+
/* limit taglen */
59+
taglen = MIN(taglen, MAXBLOCKSIZE);
60+
5861
/* allocate ram */
5962
buf = XMALLOC(taglen);
6063
eax = XMALLOC(sizeof(*eax));

0 commit comments

Comments
 (0)