From: Rich Felker Date: Fri, 4 May 2012 05:26:43 +0000 (-0400) Subject: fix uninitialized var in vfwprintf printing 0-prec string X-Git-Tag: v0.9.0~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db4096c5f2ffb15e52015004ab5a900b820c6683;p=oweals%2Fmusl.git fix uninitialized var in vfwprintf printing 0-prec string this could lead to spurious failures of wide printf functions --- diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c index 42ce304f..62829806 100644 --- a/src/stdio/vfwprintf.c +++ b/src/stdio/vfwprintf.c @@ -292,7 +292,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ case 's': bs = arg.p; if (p<0) p = INT_MAX; - for (l=0; l

0; bs+=i, l++); + for (i=l=0; l

0; bs+=i, l++); if (i<0) return -1; p=l; if (w