com php-src: followup with #73276 merge: ext/openssl/openssl.c
| From: | Anatol Belski | Date: | Wed, 12 Oct 2016 22:36:25 +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-94989@lists.php.net to get a copy of this message | ||
Commit: 3ec841fcb1f89c2a203e06fe1249a53bbe51c43d
Author: Anatol Belski <ab@php.net> Wed, 12 Oct 2016 16:03:35 +0200
Parents: 91ec0ac723b795dadb3a879a5f5e256de7aa6539
Branches: PHP-7.0.12
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3ec841fcb1f89c2a203e06fe1249a53bbe51c43d
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 bf1f0c5..648b110 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -5546,6 +5546,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)
@@ -5553,12 +5558,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