Skip to content

Commit f00e524

Browse files
committed
Add sanity for case id'd in optesting review
1 parent e72db4a commit f00e524

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

wolfcrypt/src/aes.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10643,6 +10643,11 @@ static WARN_UNUSED_RESULT int roll_auth(
1064310643
word32 remainder;
1064410644
int ret;
1064510645

10646+
/* Sanity check on authIn to prevent segfault in xorbuf() where
10647+
* variable 'in' is dereferenced as the mask 'm' in misc.c */
10648+
if (in == NULL)
10649+
return BAD_FUNC_ARG;
10650+
1064610651
/* encode the length in */
1064710652
if (inSz <= 0xFEFF) {
1064810653
authLenSz = 2;

0 commit comments

Comments
 (0)