From: Nicholas Clark Date: Fri, 14 Apr 2006 16:43:03 +0000 (+0000) Subject: S_glob_2inpuv() did not check if lenp was NULL. Oops. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a9cfe87cba24ccf1641367562bf64bc566d5066;p=p5sagit%2Fp5-mst-13.2.git S_glob_2inpuv() did not check if lenp was NULL. Oops. p4raw-id: //depot/perl@27803 --- diff --git a/sv.c b/sv.c index 3f44139..a64b272 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); } }