From: Jarkko Hietaniemi Date: Fri, 28 Mar 2003 06:03:16 +0000 (+0000) Subject: Feeding illegal QP (like \x80) to this X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c501b37d7fe83b36852f8ad910f17d67e792406;p=p5sagit%2Fp5-mst-13.2.git Feeding illegal QP (like \x80) to this ./perl -Ilib -wne 'use PerlIO::via::QuotedPrint;BEGIN{binmode(STDIN, ":via(QuotedPrint)")};print' caused a coredump in av_length() <- nextargv() because the av was NULL. I don't know that returning Nullfp is the best thing to do, but it dodges the segfault and introduces no test failures. p4raw-id: //depot/perl@19077 --- diff --git a/doio.c b/doio.c index a1cc42a..1598391 100644 --- a/doio.c +++ b/doio.c @@ -717,6 +717,8 @@ Perl_nextargv(pTHX_ register GV *gv) #endif } PL_filemode = 0; + if (!GvAV(gv)) + return Nullfp; while (av_len(GvAV(gv)) >= 0) { STRLEN oldlen; sv = av_shift(GvAV(gv));