From 8fdd422b549aa89c85abf0d3cec589db64be43b6 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 20 Feb 2000 18:54:27 +0000 Subject: [PATCH] avoid reading out-of-bounds memory when matching against reference p4raw-id: //depot/perl@5167 --- regexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.7.4