summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-07 10:58:17 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-07 10:58:17 +0000
commit9c3dd3fe0ef5ca1dd7e835adfcf5e21c1099e72a (patch)
treeb002c5424850fbb7aba4f841725f13dc0878f281 /sv.c
parent3bb0e1a6cea7cc78a38b7dbd1b86015c363e7758 (diff)
downloadperl-9c3dd3fe0ef5ca1dd7e835adfcf5e21c1099e72a.tar.gz
avoid coredump on C<printf "%vd">
p4raw-id: //depot/perl@5596
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 8a86a92f88..f062bbb10c 100644
--- a/sv.c
+++ b/sv.c
@@ -5809,6 +5809,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
vecsv = va_arg(*args, SV*);
else if (svix < svmax)
vecsv = svargs[svix++];
+ else
+ continue;
dotstr = SvPVx(vecsv,dotstrlen);
if (DO_UTF8(vecsv))
is_utf = TRUE;
@@ -5821,6 +5823,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
vecsv = va_arg(*args, SV*);
else if (svix < svmax)
vecsv = svargs[svix++];
+ else {
+ vecstr = "";
+ veclen = 0;
+ continue;
+ }
vecstr = (U8*)SvPVx(vecsv,veclen);
utf = DO_UTF8(vecsv);
continue;