diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-07 10:58:17 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-07 10:58:17 +0000 |
commit | 9c3dd3fe0ef5ca1dd7e835adfcf5e21c1099e72a (patch) | |
tree | b002c5424850fbb7aba4f841725f13dc0878f281 /sv.c | |
parent | 3bb0e1a6cea7cc78a38b7dbd1b86015c363e7758 (diff) | |
download | perl-9c3dd3fe0ef5ca1dd7e835adfcf5e21c1099e72a.tar.gz |
avoid coredump on C<printf "%vd">
p4raw-id: //depot/perl@5596
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |