Re: CVS commit: src/tests/lib/libc/ssp

2010-12-29 Thread Paul Goyette
On Wed, 29 Dec 2010, Alan Barrett wrote: On Wed, 29 Dec 2010, Joerg Sonnenberger wrote: I don't know where "len" comes from, but bad things will happen if len > sizeof(b). ...which is exactly the intention here, isn't it? You are probably right. I think that there should be comments explai

Re: CVS commit: src/tests/lib/libc/ssp

2010-12-29 Thread Alan Barrett
On Wed, 29 Dec 2010, Joerg Sonnenberger wrote: > > I don't know where "len" comes from, but bad things will happen if > > len > sizeof(b). > > ...which is exactly the intention here, isn't it? You are probably right. I think that there should be comments explaining that the purpose of the code i

Re: CVS commit: src/tests/lib/libc/ssp

2010-12-29 Thread Paul Goyette
On Wed, 29 Dec 2010, Alan Barrett wrote: On Tue, 28 Dec 2010, Christos Zoulas wrote: Modified Files: src/tests/lib/libc/ssp: h_vsnprintf.c h_vsprintf.c -static void -wrap(char *str, size_t len, const char *fmt, ...) +void +wrap(size_t len, const char *fmt, ...) { + char b[10];

Re: CVS commit: src/tests/lib/libc/ssp

2010-12-29 Thread Joerg Sonnenberger
On Wed, Dec 29, 2010 at 10:57:27AM +0200, Alan Barrett wrote: > On Tue, 28 Dec 2010, Christos Zoulas wrote: > > Modified Files: > > src/tests/lib/libc/ssp: h_vsnprintf.c h_vsprintf.c > > > -static void > > -wrap(char *str, size_t len, const char *fmt, ...) > > +void > > +wrap(size_t len, const

Re: CVS commit: src/tests/lib/libc/ssp

2010-12-29 Thread Alan Barrett
On Tue, 28 Dec 2010, Christos Zoulas wrote: > Modified Files: > src/tests/lib/libc/ssp: h_vsnprintf.c h_vsprintf.c > -static void > -wrap(char *str, size_t len, const char *fmt, ...) > +void > +wrap(size_t len, const char *fmt, ...) > { > + char b[10]; > va_list ap; > va_sta