]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/rsa/rsa_pmeth.c
rsa/rsa_pmeth.c: Add the checks for the EVP_MD_CTX_get_size()
authorJiasheng Jiang <jiasheng@purdue.edu>
Fri, 22 Mar 2024 23:23:35 +0000 (23:23 +0000)
committerTomas Mraz <tomas@openssl.org>
Wed, 3 Apr 2024 09:21:29 +0000 (11:21 +0200)
commit882a387d0dc12afe8612c4d3f6b9cae5c04611d7
tree468a550181b99f4e93c24f9561f890cae12167fd
parentc45ca0656f8d1fe43b8cf444c88d295a063341ca
rsa/rsa_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: 75d44c0452 ("Store digests as EVP_MD instead of a NID.")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23953)
crypto/rsa/rsa_pmeth.c