From: Nicholas Clark Date: Thu, 11 May 2006 21:44:06 +0000 (+0000) Subject: Tk spots that S_glob_2pv might be called from *_nolen, so we need to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6d61a6c2941a0e1ea435ade778ce1390916b31c;p=p5sagit%2Fp5-mst-13.2.git Tk spots that S_glob_2pv might be called from *_nolen, so we need to check that len is non-NULL before assigning to it. p4raw-id: //depot/perl@28171 --- diff --git a/sv.c b/sv.c index dcc7a89..b014601 100644 --- 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); }