summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-14 16:43:03 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-14 16:43:03 +0000
commit6a9cfe87cba24ccf1641367562bf64bc566d5066 (patch)
treefdbbf8b6c32a324c077a06a08d99b153aa9160c9 /sv.c
parentb65b4fdfe53460eecfaecff3c500bb40665bb82f (diff)
downloadperl-6a9cfe87cba24ccf1641367562bf64bc566d5066.tar.gz
S_glob_2inpuv() did not check if lenp was NULL. Oops.
p4raw-id: //depot/perl@27803
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 3f44139d35..a64b27298b 100644
--- a/sv.c
+++ b/sv.c
@@ -1738,7 +1738,11 @@ S_glob_2inpuv(pTHX_ GV *gv, STRLEN *len, bool want_number)
can tail call us and return true. */
return (char *) 1;
} else {
- return SvPV(buffer, *len);
+ assert(SvPOK(buffer));
+ if (len) {
+ *len = SvCUR(buffer);
+ }
+ return SvPVX(buffer);
}
}