@@ -830,12 +830,10 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
830
830
int namelen ;
831
831
zend_string * name ;
832
832
php_unserialize_data_t var_hash ;
833
- int skip = 0 ;
834
833
835
834
PHP_VAR_UNSERIALIZE_INIT (var_hash );
836
835
837
836
for (p = val ; p < endptr ; ) {
838
- skip = 0 ;
839
837
namelen = ((unsigned char )(* p )) & (~PS_BIN_UNDEF );
840
838
841
839
if (namelen < 0 || namelen > PS_BIN_MAX || (p + namelen ) >= endptr ) {
@@ -854,9 +852,7 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
854
852
current = var_tmp_var (& var_hash );
855
853
if (php_var_unserialize (current , (const unsigned char * * ) & p , (const unsigned char * ) endptr , & var_hash )) {
856
854
ZVAL_PTR (& rv , current );
857
- if (!skip ) {
858
- php_set_session_var (name , & rv , & var_hash );
859
- }
855
+ php_set_session_var (name , & rv , & var_hash );
860
856
} else {
861
857
zend_string_release (name );
862
858
php_session_normalize_vars ();
@@ -918,15 +914,13 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
918
914
zend_string * name ;
919
915
int has_value , retval = SUCCESS ;
920
916
php_unserialize_data_t var_hash ;
921
- int skip = 0 ;
922
917
923
918
PHP_VAR_UNSERIALIZE_INIT (var_hash );
924
919
925
920
p = val ;
926
921
927
922
while (p < endptr ) {
928
923
q = p ;
929
- skip = 0 ;
930
924
while (* q != PS_DELIMITER ) {
931
925
if (++ q >= endptr ) goto break_outer_loop ;
932
926
}
@@ -946,18 +940,14 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
946
940
current = var_tmp_var (& var_hash );
947
941
if (php_var_unserialize (current , (const unsigned char * * )& q , (const unsigned char * )endptr , & var_hash )) {
948
942
ZVAL_PTR (& rv , current );
949
- if (!skip ) {
950
- php_set_session_var (name , & rv , & var_hash );
951
- }
943
+ php_set_session_var (name , & rv , & var_hash );
952
944
} else {
953
945
zend_string_release (name );
954
946
retval = FAILURE ;
955
947
goto break_outer_loop ;
956
948
}
957
949
} else {
958
- if (!skip ) {
959
- PS_ADD_VARL (name );
960
- }
950
+ PS_ADD_VARL (name );
961
951
}
962
952
zend_string_release (name );
963
953
0 commit comments