@@ -3364,7 +3364,7 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
33643364
33653365 /* If hash for removed entries exists, go until offset+length and copy the entries to it */
33663366 if (removed != NULL ) {
3367- for ( ; pos < offset + length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
3367+ for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
33683368 if (Z_TYPE_P (entry ) == IS_UNDEF ) continue ;
33693369 pos ++ ;
33703370 Z_TRY_ADDREF_P (entry );
@@ -3377,9 +3377,9 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
33773377 }
33783378 }
33793379 } else { /* otherwise just skip those entries */
3380- int pos2 = pos ;
3380+ zend_long pos2 = pos ;
33813381
3382- for ( ; pos2 < offset + length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
3382+ for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ , entry ++ ) {
33833383 if (Z_TYPE_P (entry ) == IS_UNDEF ) continue ;
33843384 pos2 ++ ;
33853385 zend_hash_packed_del_val (in_hash , entry );
@@ -3438,7 +3438,7 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
34383438
34393439 /* If hash for removed entries exists, go until offset+length and copy the entries to it */
34403440 if (removed != NULL ) {
3441- for ( ; pos < offset + length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
3441+ for ( ; pos - offset < length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
34423442 if (Z_TYPE (p -> val ) == IS_UNDEF ) continue ;
34433443 pos ++ ;
34443444 entry = & p -> val ;
@@ -3451,9 +3451,9 @@ static void php_splice(HashTable *in_hash, zend_long offset, zend_long length, H
34513451 zend_hash_del_bucket (in_hash , p );
34523452 }
34533453 } else { /* otherwise just skip those entries */
3454- int pos2 = pos ;
3454+ zend_long pos2 = pos ;
34553455
3456- for ( ; pos2 < offset + length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
3456+ for ( ; pos2 - offset < length && idx < in_hash -> nNumUsed ; idx ++ , p ++ ) {
34573457 if (Z_TYPE (p -> val ) == IS_UNDEF ) continue ;
34583458 pos2 ++ ;
34593459 zend_hash_del_bucket (in_hash , p );
0 commit comments