File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Core:
6
6
. Fixed bug #77339 (__callStatic may get incorrect arguments). (Dmitry)
7
+ . Fixed bug #77494 (Disabling class causes segfault on member access).
8
+ (Dmitry)
7
9
8
10
- Curl:
9
11
. Fixed bug #76675 (Segfault with H2 server push). (Pedro Magalhães)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #77494 (Disabling class causes segfault on member access)
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("curl " )) exit ("skip curl extension not loaded " ); ?>
5
+ --INI--
6
+ disable_classes=CURLFile
7
+ --FILE--
8
+ <?php
9
+ $ a = new CURLFile ();
10
+ var_dump ($ a ->name );
11
+ ?>
12
+ --EXPECTF--
13
+ Warning: CURLFile() has been disabled for security reasons in %sbug77494.php on line 2
14
+
15
+ Notice: Undefined property: CURLFile::$name in %sbug77494.php on line 3
16
+ NULL
Original file line number Diff line number Diff line change @@ -2855,6 +2855,17 @@ static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{
2855
2855
zend_object * intern ;
2856
2856
2857
2857
intern = zend_objects_new (class_type );
2858
+
2859
+ /* Initialize default properties */
2860
+ if (EXPECTED (class_type -> default_properties_count != 0 )) {
2861
+ zval * p = intern -> properties_table ;
2862
+ zval * end = p + class_type -> default_properties_count ;
2863
+ do {
2864
+ ZVAL_UNDEF (p );
2865
+ p ++ ;
2866
+ } while (p != end );
2867
+ }
2868
+
2858
2869
zend_error (E_WARNING , "%s() has been disabled for security reasons" , ZSTR_VAL (class_type -> name ));
2859
2870
return intern ;
2860
2871
}
You can’t perform that action at this time.
0 commit comments