]> granicus.if.org Git - php/commitdiff
Add php_openssl_store_errors to bailouts
authorLeigh <leigh@php.net>
Wed, 18 Jan 2017 15:02:52 +0000 (15:02 +0000)
committerLeigh <leigh@php.net>
Wed, 18 Jan 2017 15:02:52 +0000 (15:02 +0000)
ext/openssl/openssl.c

index 6cefaf7d65dfdddb7ca9a426ea3e47421e1ff6a7..643ac26fd435853390fe9142a211bbc29082e88f 100644 (file)
@@ -2311,6 +2311,7 @@ PHP_FUNCTION(openssl_x509_parse)
        bn_serial = ASN1_INTEGER_to_BN(asn1_serial, NULL);
        /* Can return NULL on error or memory allocation failure */
        if (!bn_serial) {
+               php_openssl_store_errors();
                RETURN_FALSE;
        }
 
@@ -2318,6 +2319,7 @@ PHP_FUNCTION(openssl_x509_parse)
        BN_free(bn_serial);
        /* Can return NULL on error or memory allocation failure */
        if (!hex_serial) {
+               php_openssl_store_errors();
                RETURN_FALSE;
        }