The branch master has been updated
       via  a7e974c7be90e2c9673e2ce6215a70f734eb8ad4 (commit)
      from  124055a96e8533735b32e6af0fa7913c100ffad2 (commit)


- Log -----------------------------------------------------------------
commit a7e974c7be90e2c9673e2ce6215a70f734eb8ad4
Author: mrpre <[email protected]>
Date:   Fri Aug 28 16:12:51 2015 +0800

    check bn_new return value
    
    Slightly modified from the original PR.
    Signed-off-by: Rich Salz <[email protected]>
    Reviewed-by: Richard Levitte <[email protected]>

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

Summary of changes:
 crypto/asn1/x_bignum.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/asn1/x_bignum.c b/crypto/asn1/x_bignum.c
index 66ce000..d2666e1 100644
--- a/crypto/asn1/x_bignum.c
+++ b/crypto/asn1/x_bignum.c
@@ -163,8 +163,8 @@ static int bn_c2i(ASN1_VALUE **pval, const unsigned char 
*cont, int len,
 {
     BIGNUM *bn;
 
-    if (!*pval)
-        bn_new(pval, it);
+    if (*pval == NULL && !bn_new(pval, it))
+        return 0;
     bn = (BIGNUM *)*pval;
     if (!BN_bin2bn(cont, len, bn)) {
         bn_free(pval, it);
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to