1 Description: pcre_exec does not fill offsets for certain regexps
2 Origin: upstream, http://vcs.pcre.org/pcre/code/trunk/pcre_exec.c?r1=1502&r2=1510
3 Bug: https://bugs.exim.org/show_bug.cgi?id=1537
4 Bug-Debian: https://bugs.debian.org/794589
6 Last-Update: 2015-09-10
11 @@ -1467,7 +1467,18 @@ for (;;)
12 md->offset_vector[offset] =
13 md->offset_vector[md->offset_end - number];
14 md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
15 - if (offset_top <= offset) offset_top = offset + 2;
17 + /* If this group is at or above the current highwater mark, ensure that
18 + any groups between the current high water mark and this group are marked
19 + unset and then update the high water mark. */
21 + if (offset >= offset_top)
23 + register int *iptr = md->offset_vector + offset_top;
24 + register int *iend = md->offset_vector + offset;
25 + while (iptr < iend) *iptr++ = -1;
26 + offset_top = offset + 2;
29 ecode += 1 + IMM2_SIZE;