]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix coverity-1604666
authorNeil Horman <nhorman@openssl.org>
Mon, 15 Jul 2024 18:30:16 +0000 (14:30 -0400)
committerTomas Mraz <tomas@openssl.org>
Wed, 17 Jul 2024 14:31:47 +0000 (16:31 +0200)
commitb9ba50cdcafe5803ca56ebf07291703654aafb9b
tree9a22c4b102dc7a5eafe1adadefb889e16b21efbd
parent03d0fabaab0624f0972aa1335e107a1f2db6fa1f
Fix coverity-1604666

Coverity recently flaged an error in which the return value for
EVP_MD_get_size wasn't checked for negative values prior to use, which
can cause underflow later in the function.

Just add the check and error out if get_size returns an error.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24896)

(cherry picked from commit 22e08c7cdc596d4f16749811d1022fb8b07a8e41)
crypto/rsa/rsa_oaep.c