Re: [libvirt] [PATCH] maint: don't permit format strings without %

2012-07-26 Thread Eric Blake
On 07/24/2012 02:00 AM, Daniel P. Berrange wrote: > On Mon, Jul 23, 2012 at 02:37:42PM -0600, Eric Blake wrote: >> Any time we have a string with no % passed through gettext, a >> translator can inject a % to cause a stack overread. When there >> is nothing to format, it's easier to ask for a stri

Re: [libvirt] [PATCH] maint: don't permit format strings without %

2012-07-26 Thread Eric Blake
On 07/24/2012 01:45 PM, Eric Blake wrote: > The quoted printf version ends up converting the literal leading space > into '|', giving a regex (|VIR_ERROR|...) for $(func_re) which matches > _everything_, when used with no further anchors. Thankfully, we were > always using $(func_re) with a prece

Re: [libvirt] [PATCH] maint: don't permit format strings without %

2012-07-24 Thread Eric Blake
On 07/23/2012 03:05 PM, Jim Meyering wrote: > Eric Blake wrote: >> Any time we have a string with no % passed through gettext, a >> translator can inject a % to cause a stack overread. When there >> is nothing to format, it's easier to ask for a string that cannot >> be used as a formatter, by usi

Re: [libvirt] [PATCH] maint: don't permit format strings without %

2012-07-24 Thread Daniel P. Berrange
On Mon, Jul 23, 2012 at 02:37:42PM -0600, Eric Blake wrote: > Any time we have a string with no % passed through gettext, a > translator can inject a % to cause a stack overread. When there > is nothing to format, it's easier to ask for a string that cannot > be used as a formatter, by using a tri

Re: [libvirt] [PATCH] maint: don't permit format strings without %

2012-07-24 Thread Jim Meyering
Eric Blake wrote: > Any time we have a string with no % passed through gettext, a > translator can inject a % to cause a stack overread. When there > is nothing to format, it's easier to ask for a string that cannot > be used as a formatter, by using a trivial "%s" format instead. > > In the past,

[libvirt] [PATCH] maint: don't permit format strings without %

2012-07-23 Thread Eric Blake
Any time we have a string with no % passed through gettext, a translator can inject a % to cause a stack overread. When there is nothing to format, it's easier to ask for a string that cannot be used as a formatter, by using a trivial "%s" format instead. In the past, we have used --disable-nls t