diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-28 06:03:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-28 06:03:16 +0000 |
commit | 5c501b37d7fe83b36852f8ad910f17d67e792406 (patch) | |
tree | b6e48ccf745571855cd54fdc28acd6df05e8200c /doio.c | |
parent | 6d80e9d0fed5aaa368313563b0a51ac19967da35 (diff) | |
download | perl-5c501b37d7fe83b36852f8ad910f17d67e792406.tar.gz |
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
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)); |