1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
2004-11-18  Ulrich Drepper  <drepper@redhat.com>
	* libio/libio.h (_IO_FLAGS2_FORTIFY): Renamed from
	_IO_FLAGS2_CHECK_PERCENT_N.
	* debug/fprintff_chk.c: Adjust all users.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/vprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.  Detect missing %N$ formats.
	* debug/tst-chk1.c: Test detection of missing %N$ formats.
This commit is contained in:
Ulrich Drepper
2004-11-18 23:25:46 +00:00
parent fb67e07dfb
commit 1b1d36792e
9 changed files with 49 additions and 17 deletions

View File

@@ -30,12 +30,12 @@ __vprintf_chk (int flag, const char *format, va_list ap)
_IO_acquire_lock (stdout);
if (flag > 0)
stdout->_flags2 |= _IO_FLAGS2_CHECK_PERCENT_N;
stdout->_flags2 |= _IO_FLAGS2_FORTIFY;
done = vfprintf (stdout, format, ap);
if (flag > 0)
stdout->_flags2 &= ~_IO_FLAGS2_CHECK_PERCENT_N;
stdout->_flags2 &= ~_IO_FLAGS2_FORTIFY;
_IO_release_lock (stdout);
return done;