We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dc600c commit 5e68671Copy full SHA for 5e68671
ext/openssl/openssl.c
@@ -7940,11 +7940,10 @@ PHP_OPENSSL_API zend_string* php_openssl_random_pseudo_bytes(zend_long buffer_le
7940
PHP_OPENSSL_CHECK_LONG_TO_INT_NULL_RETURN(buffer_length, length);
7941
PHP_OPENSSL_RAND_ADD_TIME();
7942
if (RAND_bytes((unsigned char*)ZSTR_VAL(buffer), (int)buffer_length) <= 0) {
7943
+ php_openssl_store_errors();
7944
zend_string_release_ex(buffer, 0);
7945
zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
7946
return NULL;
- } else {
7947
- php_openssl_store_errors();
7948
}
7949
7950
return buffer;
0 commit comments