This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC extension for protecting applications from format stringattacks


On Thu, 5 Apr 2001, Richard Henderson wrote:

> #define printf(FMT, ...) \
>   xprintf(check_it(__VA_LIST__), (FMT), ## __VA_LIST__)

Then watch lots of programs break that do nasty things like

printf (
#if something
        abc_string
#else
        xyz_string
#endif
       );

Yes, I know this code breaks standards as printf is explicitly allowed to
be a macro, and I know recent glibc defines printf as a macro, but....

Alan
-- 
Linuxcare


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]