Tk spots that S_glob_2pv might be called from *_nolen, so we need to
Nicholas Clark [Thu, 11 May 2006 21:44:06 +0000 (21:44 +0000)]
check that len is non-NULL before assigning to it.

p4raw-id: //depot/perl@28171

sv.c

diff --git a/sv.c b/sv.c
index dcc7a89..b014601 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1752,7 +1752,9 @@ S_glob_2pv(pTHX_ GV * const gv, STRLEN * const len)
     SvFLAGS(gv) |= wasfake;
 
     assert(SvPOK(buffer));
-    *len = SvCUR(buffer);
+    if (len) {
+       *len = SvCUR(buffer);
+    }
     return SvPVX(buffer);
 }