From: Jarkko Hietaniemi Date: Wed, 2 Jul 2003 11:34:49 +0000 (+0000) Subject: Fix for [perl #22759 insufficient format string checking]; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a7a539e5f0eb5f1cbbfca9c0aa7cbe4f16372b1;p=p5sagit%2Fp5-mst-13.2.git Fix for [perl #22759 insufficient format string checking]; using ewix makes no sense, assuming evix was intended, no old tests fail; add the test case. p4raw-id: //depot/perl@19931 --- diff --git a/sv.c b/sv.c index b6d0920..69fbbaa 100644 --- a/sv.c +++ b/sv.c @@ -8668,7 +8668,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV vecsv = va_arg(*args, SV*); else vecsv = (evix ? evix <= svmax : svix < svmax) ? - svargs[ewix ? ewix-1 : svix++] : &PL_sv_undef; + svargs[evix ? evix-1 : svix++] : &PL_sv_undef; dotstr = SvPVx(vecsv, dotstrlen); if (DO_UTF8(vecsv)) is_utf8 = TRUE; diff --git a/t/op/sprintf.t b/t/op/sprintf.t index e767a78..60771a3 100755 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -380,3 +380,4 @@ __END__ >%*.*K %d< >[13, 29, 76]< >%*.*K 13 INVALID< >%4$K %d< >[45, 67]< >%4$K 45 INVALID< >%d %K %d< >[23, 45]< >23 %K 45 INVALID< +>%*v*999\$d %d %d< >[11, 22, 33]< >%*v*999\$d 11 22 INVALID<