Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-19 Thread Robert Millan
On Tue, Jan 19, 2010 at 10:56:48PM +, Colin Watson wrote: > On Tue, Jan 19, 2010 at 11:29:14PM +0100, Robert Millan wrote: > > On Sun, Jan 17, 2010 at 01:02:55PM +0100, Vladimir 'φ-coder/phcoder' > > Serbinenko wrote: > > > Robert Millan wrote: > > > > On Fri, Jan 01, 2010 at 09:32:24AM +,

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-19 Thread Colin Watson
On Tue, Jan 19, 2010 at 11:29:14PM +0100, Robert Millan wrote: > On Sun, Jan 17, 2010 at 01:02:55PM +0100, Vladimir 'φ-coder/phcoder' > Serbinenko wrote: > > Robert Millan wrote: > > > On Fri, Jan 01, 2010 at 09:32:24AM +, Colin Watson wrote: > > >> On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vl

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-19 Thread Robert Millan
On Sun, Jan 17, 2010 at 01:02:55PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Robert Millan wrote: > > On Fri, Jan 01, 2010 at 09:32:24AM +, Colin Watson wrote: > > > >> On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' > >> Serbinenko wrote: > >> > >>> +

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-17 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Robert Millan wrote: > On Fri, Jan 01, 2010 at 09:32:24AM +, Colin Watson wrote: > >> On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' >> Serbinenko wrote: >> >>> +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) >>> + __attribute__ ((format (printf, 1, 2

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-17 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Robert Millan wrote: > On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' > Serbinenko wrote: > >> sprintf is potentially dangerous especially with gettext, when messages >> may be larger than coder would expect. I attach the patch to fix it >> > > Could you split the pat

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-17 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Colin Watson wrote: > On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' > Serbinenko wrote: > >> +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) >> + __attribute__ ((format (printf, 1, 2))); >> > > It's very confusing that you've made grub_asprintf have a dr

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-01 Thread Colin Watson
On Fri, Jan 01, 2010 at 12:52:56PM +0100, Robert Millan wrote: > On Fri, Jan 01, 2010 at 09:32:24AM +, Colin Watson wrote: > > On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' > > Serbinenko wrote: > > > +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) > > > + _

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-01 Thread Robert Millan
On Fri, Jan 01, 2010 at 09:32:24AM +, Colin Watson wrote: > On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' > Serbinenko wrote: > > +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) > > + __attribute__ ((format (printf, 1, 2))); > > It's very confusing that you

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-01 Thread Robert Millan
On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > sprintf is potentially dangerous especially with gettext, when messages > may be larger than coder would expect. I attach the patch to fix it Could you split the patches into one for asprintf and one for *npr

Re: [PATCH] switch from sprintf to asprintf and snprintf

2010-01-01 Thread Colin Watson
On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) > + __attribute__ ((format (printf, 1, 2))); It's very confusing that you've made grub_asprintf have a dramatically different interface from asprin