summaryrefslogtreecommitdiff
path: root/nuttx/libc/stdio/lib_sscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/libc/stdio/lib_sscanf.c')
-rw-r--r--nuttx/libc/stdio/lib_sscanf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nuttx/libc/stdio/lib_sscanf.c b/nuttx/libc/stdio/lib_sscanf.c
index 77a6cf212..3666cbf2b 100644
--- a/nuttx/libc/stdio/lib_sscanf.c
+++ b/nuttx/libc/stdio/lib_sscanf.c
@@ -197,6 +197,11 @@ int vsscanf(FAR char *buf, FAR const char *fmt, va_list ap)
noassign = false;
lflag = false;
+ /* NOTE that there is a flaw in this loop logic: The fmt string often
+ * terminates with %n which would have to be processes at the end of the
+ * buf string. That won't happen here.
+ */
+
while (*fmt && *buf)
{
/* Skip over white space */