Skip to content

Commit 0ceed2d

Browse files
authored
Merge pull request #9664 from padelsbach/hmac-update-len-check
Add length check to Hmac_UpdateFinal_CT to prevent build error
2 parents 9aabef0 + f3fb63a commit 0ceed2d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/tls.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,9 @@ static int Hmac_UpdateFinal_CT(Hmac* hmac, byte* digest, const byte* in,
937937
word32 realLen;
938938
byte extraBlock;
939939

940+
if (macLen <= 0 || macLen > (int)sizeof(hmac->innerHash))
941+
return BAD_FUNC_ARG;
942+
940943
switch (hmac->macType) {
941944
#ifndef NO_SHA
942945
case WC_SHA:

0 commit comments

Comments
 (0)