mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
* stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn
doesn't manage to write anything, fail.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2008-07-15 Ulrich Drepper <drepper@redhat.com>
|
2008-07-15 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn
|
||||||
|
doesn't manage to write anything, fail.
|
||||||
|
|
||||||
* malloc/hooks.c (__malloc_check_init): Remove printf.
|
* malloc/hooks.c (__malloc_check_init): Remove printf.
|
||||||
|
|
||||||
2008-07-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
2008-07-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007
|
/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
@@ -2080,6 +2080,8 @@ _IO_helper_overflow (_IO_FILE *s, int c)
|
|||||||
{
|
{
|
||||||
_IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
|
_IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
|
||||||
used);
|
used);
|
||||||
|
if (written == 0)
|
||||||
|
return WEOF;
|
||||||
s->_wide_data->_IO_write_ptr -= written;
|
s->_wide_data->_IO_write_ptr -= written;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -2087,6 +2089,8 @@ _IO_helper_overflow (_IO_FILE *s, int c)
|
|||||||
if (used)
|
if (used)
|
||||||
{
|
{
|
||||||
_IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
|
_IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
|
||||||
|
if (written == 0)
|
||||||
|
return EOF;
|
||||||
s->_IO_write_ptr -= written;
|
s->_IO_write_ptr -= written;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user