mirror of git://sourceware.org/git/glibc.git
The _chk variants of all of the printf functions become much simpler.
This is the last thing that we needed _IO_acquire_lock_clear_flags2
for, so it can go as well. I took the opportunity to make the headers
included and the names of all local variables consistent across all the
affected files.
Since we ultimately want to get rid of __no_long_double as well, it
must be possible to get all of the nontrivial effects of the _chk
functions by calling the _internal functions with appropriate flags.
For most of the __(v)xprintf_chk functions, this is covered by
PRINTF_FORTIFY plus some up-front argument checks that can be
duplicated. However, __(v)sprintf_chk installs a custom jump table so
that it can crash instead of overflowing the output buffer. This
functionality is moved to __vsprintf_internal, which now has a
'maxlen' argument like __vsnprintf_internal; to get the unsafe
behavior of ordinary (v)sprintf, pass -1 for that argument.
obstack_printf_chk and obstack_vprintf_chk are no longer in the same
file.
As a side-effect of the unification of both fortified and non-fortified
vdprintf initialization, this patch fixes bug 11319 for __dprintf_chk
and __vdprintf_chk, which was previously fixed only for dprintf and
vdprintf by the commit
commit
|
||
|---|---|---|
| .. | ||
| Depend | ||
| Makefile | ||
| Versions | ||
| asprintf_chk.c | ||
| backtrace-tst.c | ||
| backtrace.c | ||
| backtracesyms.c | ||
| backtracesymsfd.c | ||
| catchsegv.sh | ||
| chk_fail.c | ||
| confstr_chk.c | ||
| dprintf_chk.c | ||
| execinfo.h | ||
| explicit_bzero_chk.c | ||
| fdelt_chk.c | ||
| fgets_chk.c | ||
| fgets_u_chk.c | ||
| fgetws_chk.c | ||
| fgetws_u_chk.c | ||
| fortify_fail.c | ||
| fprintf_chk.c | ||
| fread_chk.c | ||
| fread_u_chk.c | ||
| fwprintf_chk.c | ||
| getcwd_chk.c | ||
| getdomainname_chk.c | ||
| getgroups_chk.c | ||
| gethostname_chk.c | ||
| gets_chk.c | ||
| getwd_chk.c | ||
| longjmp_chk.c | ||
| mbsnrtowcs_chk.c | ||
| mbsrtowcs_chk.c | ||
| mbstowcs_chk.c | ||
| memcpy_chk.c | ||
| memmove_chk.c | ||
| mempcpy_chk.c | ||
| memset_chk.c | ||
| noophooks.c | ||
| obprintf_chk.c | ||
| pcprofile.c | ||
| pcprofiledump.c | ||
| poll_chk.c | ||
| ppoll_chk.c | ||
| pread64_chk.c | ||
| pread_chk.c | ||
| printf_chk.c | ||
| read_chk.c | ||
| readlink_chk.c | ||
| readlinkat_chk.c | ||
| readonly-area.c | ||
| realpath_chk.c | ||
| recv_chk.c | ||
| recvfrom_chk.c | ||
| segfault.c | ||
| snprintf_chk.c | ||
| sprintf_chk.c | ||
| stack_chk_fail.c | ||
| stack_chk_fail_local.c | ||
| stpcpy_chk.c | ||
| stpncpy_chk.c | ||
| strcat_chk.c | ||
| strcpy_chk.c | ||
| strncat_chk.c | ||
| strncpy_chk.c | ||
| swprintf_chk.c | ||
| test-stpcpy_chk.c | ||
| test-strcpy_chk.c | ||
| tst-backtrace.h | ||
| tst-backtrace2.c | ||
| tst-backtrace3.c | ||
| tst-backtrace4.c | ||
| tst-backtrace5.c | ||
| tst-backtrace6.c | ||
| tst-chk1.c | ||
| tst-chk2.c | ||
| tst-chk3.c | ||
| tst-chk4.cc | ||
| tst-chk5.cc | ||
| tst-chk6.cc | ||
| tst-lfschk1.c | ||
| tst-lfschk2.c | ||
| tst-lfschk3.c | ||
| tst-lfschk4.cc | ||
| tst-lfschk5.cc | ||
| tst-lfschk6.cc | ||
| tst-longjmp_chk.c | ||
| tst-longjmp_chk2.c | ||
| tst-longjmp_chk3.c | ||
| tst-ssp-1.c | ||
| ttyname_r_chk.c | ||
| vasprintf_chk.c | ||
| vdprintf_chk.c | ||
| vfprintf_chk.c | ||
| vfwprintf_chk.c | ||
| vobprintf_chk.c | ||
| vprintf_chk.c | ||
| vsnprintf_chk.c | ||
| vsprintf_chk.c | ||
| vswprintf_chk.c | ||
| vwprintf_chk.c | ||
| warning-nop.c | ||
| wcpcpy_chk.c | ||
| wcpncpy_chk.c | ||
| wcrtomb_chk.c | ||
| wcscat_chk.c | ||
| wcscpy_chk.c | ||
| wcsncat_chk.c | ||
| wcsncpy_chk.c | ||
| wcsnrtombs_chk.c | ||
| wcsrtombs_chk.c | ||
| wcstombs_chk.c | ||
| wctomb_chk.c | ||
| wmemcpy_chk.c | ||
| wmemmove_chk.c | ||
| wmempcpy_chk.c | ||
| wmemset_chk.c | ||
| wprintf_chk.c | ||
| xtrace.sh | ||