From: H.Merijn Brand Date: Wed, 15 Jun 2005 13:57:57 +0000 (+0000) Subject: Protect Perl_sv_2pvbyte () to NULL length pointers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=97972285a7cc3296dc99230fa10f7a030afa733f;p=p5sagit%2Fp5-mst-13.2.git Protect Perl_sv_2pvbyte () to NULL length pointers Thanks Nick! p4raw-id: //depot/perl@24850 --- diff --git a/sv.c b/sv.c index 4035241..bd49a28 100644 --- a/sv.c +++ b/sv.c @@ -3775,7 +3775,7 @@ char * Perl_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); - return SvPV(sv,*lp); + return lp ? SvPV(sv,*lp) : SvPV_nolen(sv); } /*