Merge pull request #9664 from padelsbach/hmac-update-len-check

Add length check to Hmac_UpdateFinal_CT to prevent build error
This commit is contained in:
Daniel Pouzzner
2026-01-16 15:35:58 -06:00
committed by GitHub

View File

@@ -937,6 +937,9 @@ static int Hmac_UpdateFinal_CT(Hmac* hmac, byte* digest, const byte* in,
word32 realLen;
byte extraBlock;
if (macLen <= 0 || macLen > (int)sizeof(hmac->innerHash))
return BAD_FUNC_ARG;
switch (hmac->macType) {
#ifndef NO_SHA
case WC_SHA: