Skip to content

Commit 2e5d64a

Browse files
committed
ext/standard/scanf: use zend_ulong type instead of int for objIndex variable
1 parent 86a447d commit 2e5d64a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/standard/scanf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ PHPAPI int php_sscanf_internal( char *string, char *format,
578578
int numVars, nconversions, totalVars = -1;
579579
int i, result;
580580
zend_long value;
581-
int objIndex;
581+
zend_ulong objIndex;
582582
char *end, *baseString;
583583
zval *current;
584584
char op = 0;
@@ -695,11 +695,11 @@ PHPAPI int php_sscanf_internal( char *string, char *format,
695695
flags |= SCAN_SUPPRESS;
696696
ch = format++;
697697
} else if ( isdigit(UCHAR(*ch))) {
698-
value = ZEND_STRTOUL(format-1, &end, 10);
698+
zend_ulong assignment_index = ZEND_STRTOUL(format-1, &end, 10);
699699
if (*end == '$') {
700700
format = end+1;
701701
ch = format++;
702-
objIndex = varStart + value - 1;
702+
objIndex = assignment_index - 1;
703703
}
704704
}
705705

0 commit comments

Comments
 (0)