summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2005-06-15 13:57:57 +0000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2005-06-15 13:57:57 +0000
commit97972285a7cc3296dc99230fa10f7a030afa733f (patch)
tree7fe203266c0d1c19d11af92c15a9de655daec9a2 /sv.c
parent39c9c9cd8e3664420b75ceafcc0d146575e756e4 (diff)
downloadperl-97972285a7cc3296dc99230fa10f7a030afa733f.tar.gz
Protect Perl_sv_2pvbyte () to NULL length pointers
Thanks Nick! p4raw-id: //depot/perl@24850
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 403524122d..bd49a28e22 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);
}
/*