Branch: refs/heads/openssl-3.0
Home: https://github.openssl.org/openssl/openssl
Commit: c6b5c00c0e6a95eb68b936e0a2a55741717c642a
https://github.openssl.org/openssl/openssl/commit/c6b5c00c0e6a95eb68b936e0a2a55741717c642a
Author: slontis <[email protected]>
Date: 2022-07-05 (Tue, 05 Jul 2022)
Changed paths:
M crypto/bn/bn_gcd.c
Log Message:
-----------
Fix bn_gcd code to check return value when calling BN_one()
BN_one() uses the expand function which calls malloc which may fail.
All other places that reference BN_one() check the return value.
The issue is triggered by a memory allocation failure.
Detected by PR #18355
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/18697)
(cherry picked from commit 7fe7cc57af3db1e497877f0329ba17609b2efc8b)