Message ID | d5881429-14b1-4684-be84-ee0d6573737d@kernkonzept.com |
---|---|
State | New |
Headers | show |
Series | [uclibc-ng-devel] Re: Issue: Possible buffer overflow in _vfprintf.c (out-of-bounds access) | expand |
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c index fc5d3ff68..2605f6682 100644 --- a/libc/stdio/_vfprintf.c +++ b/libc/stdio/_vfprintf.c @@ -1042,6 +1042,15 @@ int attribute_hidden _ppfs_parsespec(ppfs_t *ppfs) } --n; /* Record argtype with largest size (current, new). */ + if (!(n>=0 && n<9)) + { + if (n==-1) + puts("## Buffer-overflow ## [-1]"); + else if (n==9) + puts("## Buffer-overflow ## [9]"); + else + puts("## Buffer-overflow ## [?]"); + } if (_is_equal_or_bigger_arg(ppfs->argtype[n], argtype[i])) { ppfs->argtype[n] = argtype[i]; }