diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-05 09:24:03 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-05 09:24:03 -0400 |
commit | 2f3d02cd83a46244c3f5a6fec851d7eded1376f4 (patch) | |
tree | 44bc11b3cd19ff1cded56ea3b0e02a727ff85514 | |
parent | f9569662c08d371b85c77f025dd5c6e00b4a4c8b (diff) | |
download | musl-2f3d02cd83a46244c3f5a6fec851d7eded1376f4.tar.gz |
fix overflow in printf %N$ argument handling
-rw-r--r-- | src/stdio/vfprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 2245d1da..a8cf41b6 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -633,8 +633,8 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, int vfprintf(FILE *f, const char *fmt, va_list ap) { va_list ap2; - int nl_type[NL_ARGMAX] = {0}; - union arg nl_arg[NL_ARGMAX]; + int nl_type[NL_ARGMAX+1] = {0}; + union arg nl_arg[NL_ARGMAX+1]; unsigned char internal_buf[80], *saved_buf = 0; int ret; |