mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
* stdio-common/vfprintf.c (vfprintf): Correct overflow test.
This commit is contained in:
parent
e8a3212650
commit
43f6bec195
@ -1,5 +1,7 @@
|
||||
2008-03-29 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* stdio-common/vfprintf.c (vfprintf): Correct overflow test.
|
||||
|
||||
[BZ #5939]
|
||||
* sysdeps/posix/tempname.c (__gen_tempname): Correct flag selection.
|
||||
|
||||
|
@ -1513,7 +1513,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
||||
if (prec > width
|
||||
&& prec + 32 > (int)(sizeof (work_buffer) / sizeof (work_buffer[0])))
|
||||
{
|
||||
if (__builtin_expect (prec > ~((size_t) 0) - 31, 0))
|
||||
if (__builtin_expect (prec > ~((size_t) 0) / sizeof (CHAR_T) - 31,
|
||||
0))
|
||||
{
|
||||
done = -1;
|
||||
goto all_done;
|
||||
|
Loading…
Reference in New Issue
Block a user