summaryrefslogtreecommitdiff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 78dc2fcfe5..c0b93ae3b7 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1757,7 +1757,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
we must recognize "(nil)" as well. */
if (__builtin_expect (wpsize == 0
&& (flags & READ_POINTER)
- && (width < 0 || width >= 0)
+ && (width < 0 || width >= 5)
&& c == '('
&& TOLOWER (inchar ()) == L_('n')
&& TOLOWER (inchar ()) == L_('i')
@@ -1966,6 +1966,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
if (width > 0)
--width;
}
+ else
+ got_digit = 1;
}
while (1)