Skip to content

Commit 7da1916

Browse files
committed
Return failure if sigLen == 0
1 parent b17755b commit 7da1916

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfcrypt/src/evp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4992,7 +4992,7 @@ int wolfSSL_EVP_DigestVerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
49924992

49934993
hashLen = wolfssl_mac_len(ctx->hash.hmac.macType);
49944994

4995-
if (siglen > hashLen || siglen > INT_MAX)
4995+
if (siglen == 0 || siglen > hashLen || siglen > INT_MAX)
49964996
return WOLFSSL_FAILURE;
49974997
/* May be a truncated signature. */
49984998
}

0 commit comments

Comments
 (0)