We must not follow the NULL pointer.
. Fixed bug #78038 (Socket_select fails when resource array contains
references). (Nikita)
+- Sodium:
+ . Fixed bug #78114 (segfault when calling sodium_* functions from eval). (cmb)
+
- Zip:
. Fixed bug #76345 (zip.h not found). (Michael Maroszek)
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(trace), frame) {
if (Z_TYPE_P(frame) == IS_ARRAY) {
zval *args = zend_hash_str_find(Z_ARRVAL_P(frame), "args", sizeof("args")-1);
- zval_ptr_dtor(args);
- ZVAL_EMPTY_ARRAY(args);
+ if (args) {
+ zval_ptr_dtor(args);
+ ZVAL_EMPTY_ARRAY(args);
+ }
}
} ZEND_HASH_FOREACH_END();
}
--- /dev/null
+--TEST--
+Bug #78114 (segfault when calling sodium_* functions from eval)
+--SKIPIF--
+<?php
+if (!extension_loaded('sodium')) die('skip sodium extension not available');
+?>
+--FILE--
+<?php
+try {
+ eval('sodium_bin2hex();');
+} catch (Throwable $ex) {
+ echo $ex->getMessage(), PHP_EOL;
+}
+?>
+--EXPECT--
+sodium_bin2hex() expects exactly 1 parameter, 0 given