diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-02-07 07:06:49 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-02-07 07:06:49 +0000 |
commit | fac054e086ae3d1cc1024093c68962207bcb9c34 (patch) | |
tree | cbd631fa941d0d4e957522d5db66b60511e5e631 /libc | |
parent | 684b831f6e62cba0957d6ad92a2fa473905d37db (diff) |
Fix stack overflow in _ppfs_parsespec
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdio/_vfprintf.c | 2 |
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__ */ |