From: Gurusamy Sarathy Date: Sun, 20 Feb 2000 18:54:27 +0000 (+0000) Subject: avoid reading out-of-bounds memory when matching against reference X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8fdd422b549aa89c85abf0d3cec589db64be43b6;p=p5sagit%2Fp5-mst-13.2.git avoid reading out-of-bounds memory when matching against reference p4raw-id: //depot/perl@5167 --- diff --git a/regexec.c b/regexec.c index f9f2cc0..d2ebc44 100644 --- a/regexec.c +++ b/regexec.c @@ -688,7 +688,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, ? s + (prog->minlen? cl_l : 0) : (prog->float_substr ? check_at - start_shift + cl_l : strend) ; - char *startpos = sv ? strend - SvCUR(sv) : s; + char *startpos = sv && SvPOK(sv) ? strend - SvCUR(sv) : s; t = s; if (prog->reganch & ROPT_UTF8) {