File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ PHP NEWS
1616- Opcache:
1717 . Fixed bug #76832 (ZendOPcache.MemoryBase periodically deleted by the OS).
1818 (Anatol)
19+ . Fixed bug #76796 (Compile-time evaluation of disabled function in opcache
20+ causes segfault). (Nikita)
1921
2022- POSIX:
2123 Fixed bug #75696 (posix_getgrnam fails to print details of group). (cmb)
Original file line number Diff line number Diff line change @@ -953,7 +953,8 @@ static inline int ct_eval_func_call(
953953 }
954954
955955 func = zend_hash_find_ptr (CG (function_table ), name );
956- if (!func || func -> type != ZEND_INTERNAL_FUNCTION ) {
956+ if (!func || func -> type != ZEND_INTERNAL_FUNCTION
957+ || func -> internal_function .handler == ZEND_FN (display_disabled_function )) {
957958 return FAILURE ;
958959 }
959960
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Bug #76796: Compile-time evaluation of disabled function in opcache (SCCP) causes segfault
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.optimization_level=-1
7+ disable_functions=strpos
8+ --FILE--
9+ <?php
10+
11+ var_dump (strpos ('foo ' , 'bar ' ));
12+
13+ ?>
14+ --EXPECTF--
15+ Warning: strpos() has been disabled for security reasons in %s on line %d
16+ NULL
You can’t perform that action at this time.
0 commit comments