1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Always allow overwriting printf modifiers etc.

This commit is contained in:
Ulrich Drepper
2010-12-24 19:28:32 -05:00
parent 14b697f75a
commit 07eb4b716e
2 changed files with 18 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2010-12-24 Ulrich Drepper <drepper@gmail.com>
* stdio-common/vfprintf.c (vfprintf): If printf handlers are installed
always use the slow path.
2010-12-15 Ryan S. Arnold <rsa@us.ibm.com>
* elf/Makefile: (check-execstack): Replace $(native-compile) with a

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1991-2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1318,6 +1318,12 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
if (*f == L_('\0'))
goto all_done;
/* Use the slow path in case any printf handler is registered. */
if (__builtin_expect (__printf_function_table != NULL
|| __printf_modifier_table != NULL
|| __printf_va_arg_table != NULL, 0))
goto do_positional;
/* Process whole format string. */
do
{