store/store_lib.c: Add the checks for the EVP_MD_CTX_get_size()
authorJiasheng Jiang <jiasheng@purdue.edu>
Fri, 22 Mar 2024 23:39:19 +0000 (23:39 +0000)
committerNeil Horman <nhorman@openssl.org>
Mon, 1 Apr 2024 16:59:17 +0000 (12:59 -0400)
commit18a30b5637cfaed0830183c1572cac76cfa40b4b
treee6065754074fdf67281e8d059cd87e2281ee3dfa
parent15e06b12ee9df6347433398cb3f732c4458d4218
store/store_lib.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: fac8673b8a ("STORE: Add the possibility to search for specific information")
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/23955)
crypto/store/store_lib.c