[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Wed Nov 3 13:29:24 UTC 2021


The branch openssl-3.0 has been updated
       via  3f671950747ed2a6655e9a0dbc08fcd9a8285091 (commit)
      from  c686efc43fe1327451b5a7f5638c9efc3085d784 (commit)


- Log -----------------------------------------------------------------
commit 3f671950747ed2a6655e9a0dbc08fcd9a8285091
Author: x2018 <xkernel.wang at foxmail.com>
Date:   Mon Nov 1 20:36:54 2021 +0800

    check the return value of BN_new() and BN_dup()
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16948)
    
    (cherry picked from commit d99004fe5de934120765d342586f08d22131b8ed)

-----------------------------------------------------------------------

Summary of changes:
 test/testutil/tests.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/testutil/tests.c b/test/testutil/tests.c
index cb3f77f14a..b431657e05 100644
--- a/test/testutil/tests.c
+++ b/test/testutil/tests.c
@@ -417,8 +417,8 @@ int test_BN_eq_word(const char *file, int line, const char *bns, const char *ws,
 
     if (a != NULL && BN_is_word(a, w))
         return 1;
-    bw = BN_new();
-    BN_set_word(bw, w);
+    if ((bw = BN_new()) != NULL)
+        BN_set_word(bw, w);
     test_fail_bignum_message(NULL, file, line, "BIGNUM", bns, ws, "==", a, bw);
     BN_free(bw);
     return 0;
@@ -431,10 +431,10 @@ int test_BN_abs_eq_word(const char *file, int line, const char *bns,
 
     if (a != NULL && BN_abs_is_word(a, w))
         return 1;
-    bw = BN_new();
-    aa = BN_dup(a);
-    BN_set_negative(aa, 0);
-    BN_set_word(bw, w);
+    if ((aa = BN_dup(a)) != NULL)
+        BN_set_negative(aa, 0);
+    if ((bw = BN_new()) != NULL)
+        BN_set_word(bw, w);
     test_fail_bignum_message(NULL, file, line, "BIGNUM", bns, ws, "abs==",
                              aa, bw);
     BN_free(bw);


More information about the openssl-commits mailing list