summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/_vfprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c
index 30ce7caef..fd2975aa3 100644
--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -898,7 +898,7 @@ int attribute_hidden _ppfs_parsespec(ppfs_t *ppfs)
) {
return -1;
}
- } while (buf[i++]);
+ } while (buf[i++] && (i < sizeof(buf)));
buf[sizeof(buf)-1] = 0;
}
#else /* __UCLIBC_HAS_WCHAR__ */