summaryrefslogtreecommitdiff
path: root/ext/standard/scanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/scanf.c')
-rw-r--r--ext/standard/scanf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index e82d9140fc..baddeb24b2 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -1094,7 +1094,7 @@ PHPAPI int php_sscanf_internal( char *string, char *format,
*end = '\0';
value = (int) (*fn)(buf, NULL, base);
if ((flags & SCAN_UNSIGNED) && (value < 0)) {
- sprintf(buf, "%u", value); /* INTL: ISO digit */
+ snprintf(buf, sizeof(buf), "%u", value); /* INTL: ISO digit */
if (numVars && objIndex >= argCount) {
break;
} else if (numVars) {