dsa/dsa_pmeth.c: Add the checks for the EVP_MD_CTX_get_size()
authorJiasheng Jiang <jiasheng@purdue.edu>
Fri, 22 Mar 2024 23:32:44 +0000 (23:32 +0000)
committerNeil Horman <nhorman@openssl.org>
Sat, 30 Mar 2024 18:49:37 +0000 (14:49 -0400)
commit15e06b12ee9df6347433398cb3f732c4458d4218
tree9171014c93ee0201c2b8a3f8b32b47ee071d5dbb
parent56e63f570bd5a479439bc6f6a2499f6b86ded341
dsa/dsa_pmeth.c: Add the checks for the EVP_MD_CTX_get_size()

Add the checks for the return value of EVP_MD_CTX_get_size() before explicitly cast them to size_t to avoid the integer overflow.

Fixes: 9d04f83410 ("Add DSA digest length checks.")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23954)
crypto/dsa/dsa_pmeth.c