summaryrefslogtreecommitdiff
path: root/libc/stdio/_vfprintf.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-02-07 07:06:49 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-02-07 07:06:49 +0000
commitfac054e086ae3d1cc1024093c68962207bcb9c34 (patch)
treecbd631fa941d0d4e957522d5db66b60511e5e631 /libc/stdio/_vfprintf.c
parent684b831f6e62cba0957d6ad92a2fa473905d37db (diff)
Fix stack overflow in _ppfs_parsespec
Diffstat (limited to 'libc/stdio/_vfprintf.c')
-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__ */