From fcf4654a77782cbee997539bf97fd6b5e29d5168 Mon Sep 17 00:00:00 2001 From: slontis Date: Fri, 1 Jul 2022 13:47:11 +1000 Subject: [PATCH] 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 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/18697)