com php-src: followup with #73276 merge: ext/openssl/openssl.c

From: Date: Thu, 13 Oct 2016 23:43:02 +0000
Subject: com php-src: followup with #73276 merge: ext/openssl/openssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95057@lists.php.net to get a copy of this message
Commit: 7897e8cd6c1d6b201eb384fac38ed41a21420ae3 Author: Anatol Belski <ab@php.net> Wed, 12 Oct 2016 16:03:35 +0200 Parents: 48f06ada897a01b94516958f0581e26d90b53140 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7897e8cd6c1d6b201eb384fac38ed41a21420ae3 Log: followup with #73276 merge (cherry picked from commit b135ba3fa93fd4f085322573d2850b29cb662e21) Bugs: https://bugs.php.net/73276 Changed paths: M ext/openssl/openssl.c Diff: diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 7fbbbe8..1aa59ad 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6458,6 +6458,11 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) return; } + if (zstrong_result_returned) { + zval_dtor(zstrong_result_returned); + ZVAL_FALSE(zstrong_result_returned); + } + if (buffer_length <= 0 #ifndef PHP_WIN32 || ZEND_LONG_INT_OVFL(buffer_length) @@ -6465,12 +6470,6 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) ) { RETURN_FALSE; } - - if (zstrong_result_returned) { - zval_dtor(zstrong_result_returned); - ZVAL_FALSE(zstrong_result_returned); - } - buffer = zend_string_alloc(buffer_length, 0); #ifdef PHP_WIN32

« previous php.cvs (#95057) next »