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 char *fmt, ...) > > { > > + char b[10]; > > va_list ap; > > va_start(ap, fmt); > > - (void)vsnprintf(str, len, fmt, ap); > > + (void)vsnprintf(b, len, fmt, ap); > > + (void)printf("%s\n", b); > > va_end(ap); > > } > > 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? Joerg