From 420218e7eb4fa5ceefe298e6d9121548b8d806d6 Mon Sep 17 00:00:00 2001 From: Larry Wall Date: Wed, 11 Jan 1995 14:06:42 -0800 Subject: [fix crash in regexec.c] In article <3ekgoo@giga.bga.com> jamshid@ses.com (Jamshid Afshar) writes: : I'm getting some unexpected behavior for a small perl script on SunOS : 4.1.3 perl 4.0p36. The same script crashes under perl 5.0 on HP-UX. : That script is at the end of this article -- it's as small as I could : make it and still reproduce the crash. Here's an unofficial patch for the problem in Perl 5. Larry --- regexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 1267065175..3992aafcdc 100644 --- a/regexec.c +++ b/regexec.c @@ -471,10 +471,10 @@ I32 safebase; /* no need to remember string in subbase */ goto phooey; got_it: + strend += dontbother; /* uncheat */ prog->subbeg = strbeg; prog->subend = strend; if ((!safebase && (prog->nparens || sawampersand)) || prog->do_folding) { - strend += dontbother; /* uncheat */ i = strend - startpos + (stringarg - strbeg); if (safebase) { /* no need for $digit later */ s = strbeg; -- cgit v1.2.1