@@ -429,6 +429,7 @@ static zend_always_inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTab
429
429
430
430
unmangled = zend_string_init (unmangled_prop , unmangled_prop_len , 0 );
431
431
if (Z_TYPE_P (rval ) == IS_OBJECT
432
+ && (unmangled_class == NULL || !strcmp (unmangled_class , "*" ) || !strcasecmp (unmangled_class , ZSTR_VAL (Z_OBJCE_P (rval )-> name )))
432
433
&& ((existing_propinfo = zend_hash_find_ptr (& Z_OBJCE_P (rval )-> properties_info , unmangled )) != NULL )
433
434
&& (existing_propinfo -> flags & ZEND_ACC_PPP_MASK )) {
434
435
if (existing_propinfo -> flags & ZEND_ACC_PROTECTED ) {
@@ -644,7 +645,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
644
645
start = cursor ;
645
646
646
647
647
- #line 648 "ext/standard/var_unserializer.c"
648
+ #line 649 "ext/standard/var_unserializer.c"
648
649
{
649
650
YYCTYPE yych ;
650
651
static const unsigned char yybm [] = {
@@ -702,9 +703,9 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
702
703
yy2 :
703
704
++ YYCURSOR ;
704
705
yy3 :
705
- #line 1035 "ext/standard/var_unserializer.re"
706
+ #line 1036 "ext/standard/var_unserializer.re"
706
707
{ return 0 ; }
707
- #line 708 "ext/standard/var_unserializer.c"
708
+ #line 709 "ext/standard/var_unserializer.c"
708
709
yy4 :
709
710
yych = * (YYMARKER = ++ YYCURSOR );
710
711
if (yych == ':' ) goto yy17 ;
@@ -751,13 +752,13 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
751
752
goto yy3 ;
752
753
yy15 :
753
754
++ YYCURSOR ;
754
- #line 1029 "ext/standard/var_unserializer.re"
755
+ #line 1030 "ext/standard/var_unserializer.re"
755
756
{
756
757
/* this is the case where we have less data than planned */
757
758
php_error_docref (NULL , E_NOTICE , "Unexpected end of serialized data" );
758
759
return 0 ; /* not sure if it should be 0 or 1 here? */
759
760
}
760
- #line 761 "ext/standard/var_unserializer.c"
761
+ #line 762 "ext/standard/var_unserializer.c"
761
762
yy17 :
762
763
yych = * ++ YYCURSOR ;
763
764
if (yybm [0 + yych ] & 128 ) {
@@ -768,13 +769,13 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
768
769
goto yy3 ;
769
770
yy19 :
770
771
++ YYCURSOR ;
771
- #line 701 "ext/standard/var_unserializer.re"
772
+ #line 702 "ext/standard/var_unserializer.re"
772
773
{
773
774
* p = YYCURSOR ;
774
775
ZVAL_NULL (rval );
775
776
return 1 ;
776
777
}
777
- #line 778 "ext/standard/var_unserializer.c"
778
+ #line 779 "ext/standard/var_unserializer.c"
778
779
yy21 :
779
780
yych = * ++ YYCURSOR ;
780
781
if (yych <= '/' ) goto yy18 ;
@@ -973,7 +974,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
973
974
goto yy18 ;
974
975
yy56 :
975
976
++ YYCURSOR ;
976
- #line 652 "ext/standard/var_unserializer.re"
977
+ #line 653 "ext/standard/var_unserializer.re"
977
978
{
978
979
zend_long id ;
979
980
@@ -998,7 +999,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
998
999
999
1000
return 1 ;
1000
1001
}
1001
- #line 1002 "ext/standard/var_unserializer.c"
1002
+ #line 1003 "ext/standard/var_unserializer.c"
1002
1003
yy58 :
1003
1004
yych = * ++ YYCURSOR ;
1004
1005
if (yych == '"' ) goto yy77 ;
@@ -1009,13 +1010,13 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1009
1010
goto yy18 ;
1010
1011
yy60 :
1011
1012
++ YYCURSOR ;
1012
- #line 707 "ext/standard/var_unserializer.re"
1013
+ #line 708 "ext/standard/var_unserializer.re"
1013
1014
{
1014
1015
* p = YYCURSOR ;
1015
1016
ZVAL_BOOL (rval , parse_iv (start + 2 ));
1016
1017
return 1 ;
1017
1018
}
1018
- #line 1019 "ext/standard/var_unserializer.c"
1019
+ #line 1020 "ext/standard/var_unserializer.c"
1019
1020
yy62 :
1020
1021
++ YYCURSOR ;
1021
1022
if ((YYLIMIT - YYCURSOR ) < 3 ) YYFILL (3 );
@@ -1035,7 +1036,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1035
1036
}
1036
1037
yy64 :
1037
1038
++ YYCURSOR ;
1038
- #line 755 "ext/standard/var_unserializer.re"
1039
+ #line 756 "ext/standard/var_unserializer.re"
1039
1040
{
1040
1041
#if SIZEOF_ZEND_LONG == 4
1041
1042
use_double :
@@ -1044,7 +1045,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1044
1045
ZVAL_DOUBLE (rval , zend_strtod ((const char * )start + 2 , NULL ));
1045
1046
return 1 ;
1046
1047
}
1047
- #line 1048 "ext/standard/var_unserializer.c"
1048
+ #line 1049 "ext/standard/var_unserializer.c"
1048
1049
yy66 :
1049
1050
yych = * ++ YYCURSOR ;
1050
1051
if (yych <= ',' ) {
@@ -1066,7 +1067,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1066
1067
goto yy18 ;
1067
1068
yy69 :
1068
1069
++ YYCURSOR ;
1069
- #line 713 "ext/standard/var_unserializer.re"
1070
+ #line 714 "ext/standard/var_unserializer.re"
1070
1071
{
1071
1072
#if SIZEOF_ZEND_LONG == 4
1072
1073
int digits = YYCURSOR - start - 3 ;
@@ -1092,14 +1093,14 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1092
1093
ZVAL_LONG (rval , parse_iv (start + 2 ));
1093
1094
return 1 ;
1094
1095
}
1095
- #line 1096 "ext/standard/var_unserializer.c"
1096
+ #line 1097 "ext/standard/var_unserializer.c"
1096
1097
yy71 :
1097
1098
yych = * ++ YYCURSOR ;
1098
1099
if (yych == '"' ) goto yy85 ;
1099
1100
goto yy18 ;
1100
1101
yy72 :
1101
1102
++ YYCURSOR ;
1102
- #line 677 "ext/standard/var_unserializer.re"
1103
+ #line 678 "ext/standard/var_unserializer.re"
1103
1104
{
1104
1105
zend_long id ;
1105
1106
@@ -1123,14 +1124,14 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1123
1124
1124
1125
return 1 ;
1125
1126
}
1126
- #line 1127 "ext/standard/var_unserializer.c"
1127
+ #line 1128 "ext/standard/var_unserializer.c"
1127
1128
yy74 :
1128
1129
yych = * ++ YYCURSOR ;
1129
1130
if (yych == '"' ) goto yy87 ;
1130
1131
goto yy18 ;
1131
1132
yy75 :
1132
1133
++ YYCURSOR ;
1133
- #line 877 "ext/standard/var_unserializer.re"
1134
+ #line 878 "ext/standard/var_unserializer.re"
1134
1135
{
1135
1136
size_t len , len2 , len3 , maxlen ;
1136
1137
zend_long elements ;
@@ -1282,10 +1283,10 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1282
1283
1283
1284
return object_common2 (UNSERIALIZE_PASSTHRU , elements );
1284
1285
}
1285
- #line 1286 "ext/standard/var_unserializer.c"
1286
+ #line 1287 "ext/standard/var_unserializer.c"
1286
1287
yy77 :
1287
1288
++ YYCURSOR ;
1288
- #line 802 "ext/standard/var_unserializer.re"
1289
+ #line 803 "ext/standard/var_unserializer.re"
1289
1290
{
1290
1291
size_t len , maxlen ;
1291
1292
zend_string * str ;
@@ -1319,10 +1320,10 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1319
1320
ZVAL_STR (rval , str );
1320
1321
return 1 ;
1321
1322
}
1322
- #line 1323 "ext/standard/var_unserializer.c"
1323
+ #line 1324 "ext/standard/var_unserializer.c"
1323
1324
yy79 :
1324
1325
++ YYCURSOR ;
1325
- #line 836 "ext/standard/var_unserializer.re"
1326
+ #line 837 "ext/standard/var_unserializer.re"
1326
1327
{
1327
1328
zend_long elements = parse_iv (start + 2 );
1328
1329
/* use iv() not uiv() in order to check data range */
@@ -1352,7 +1353,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1352
1353
1353
1354
return finish_nested_data (UNSERIALIZE_PASSTHRU );
1354
1355
}
1355
- #line 1356 "ext/standard/var_unserializer.c"
1356
+ #line 1357 "ext/standard/var_unserializer.c"
1356
1357
yy81 :
1357
1358
yych = * ++ YYCURSOR ;
1358
1359
if (yych <= '/' ) goto yy18 ;
@@ -1371,7 +1372,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1371
1372
goto yy18 ;
1372
1373
yy85 :
1373
1374
++ YYCURSOR ;
1374
- #line 866 "ext/standard/var_unserializer.re"
1375
+ #line 867 "ext/standard/var_unserializer.re"
1375
1376
{
1376
1377
zend_long elements ;
1377
1378
if (!var_hash ) return 0 ;
@@ -1382,10 +1383,10 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1382
1383
}
1383
1384
return object_common2 (UNSERIALIZE_PASSTHRU , elements );
1384
1385
}
1385
- #line 1386 "ext/standard/var_unserializer.c"
1386
+ #line 1387 "ext/standard/var_unserializer.c"
1386
1387
yy87 :
1387
1388
++ YYCURSOR ;
1388
- #line 764 "ext/standard/var_unserializer.re"
1389
+ #line 765 "ext/standard/var_unserializer.re"
1389
1390
{
1390
1391
size_t len , maxlen ;
1391
1392
char * str ;
@@ -1423,10 +1424,10 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1423
1424
}
1424
1425
return 1 ;
1425
1426
}
1426
- #line 1427 "ext/standard/var_unserializer.c"
1427
+ #line 1428 "ext/standard/var_unserializer.c"
1427
1428
yy89 :
1428
1429
++ YYCURSOR ;
1429
- #line 739 "ext/standard/var_unserializer.re"
1430
+ #line 740 "ext/standard/var_unserializer.re"
1430
1431
{
1431
1432
* p = YYCURSOR ;
1432
1433
@@ -1442,9 +1443,9 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
1442
1443
1443
1444
return 1 ;
1444
1445
}
1445
- #line 1446 "ext/standard/var_unserializer.c"
1446
+ #line 1447 "ext/standard/var_unserializer.c"
1446
1447
}
1447
- #line 1037 "ext/standard/var_unserializer.re"
1448
+ #line 1038 "ext/standard/var_unserializer.re"
1448
1449
1449
1450
1450
1451
return 0 ;
0 commit comments