Re: Fixes for compiler warnings

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Fixes for compiler warnings
Дата
Msg-id 200901182216.24364.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: Fixes for compiler warnings  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Список pgsql-hackers
On Sunday 18 January 2009 12:43:46 Grzegorz Jaskiewicz wrote:
> > -Wformat-security warns about
> >
> >    printf(var);
> >
> > but not about
> >
> >    printf(var, a);
> >
> > I don't understand that; the crash or exploit potential is pretty
> > much the
> > same in both cases.
>
> not at all. First case allows you to pass in var from outside, with
> your, well crafted format strings. Please read more about subject,
> before you say something that silly.

If your premise is that var is passed in from the outside, then the real issue 
is the %n placeholder.  And then it doesn't matter how many variadic args you 
pass.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fixes for compiler warnings
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: libpq WSACleanup is not needed