diff options
author | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:38:49 +0000 |
---|---|---|
committer | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:38:49 +0000 |
commit | 0c8732c8583c7e31476c0ec1c0ac92cc7e5f8bc0 (patch) | |
tree | 97b11a15f98ccfb7a200cc428c3bed36fd023f0f /pcre.c | |
parent | c87b6bbacc291c0a1e1d8a396de1b621151a7822 (diff) | |
download | pcre-0c8732c8583c7e31476c0ec1c0ac92cc7e5f8bc0.tar.gz |
Load pcre-2.02 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@27 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre.c')
-rw-r--r-- | pcre.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -9,7 +9,7 @@ the file Tech.Notes for some information on the internals. Written by: Philip Hazel <ph10@cam.ac.uk> - Copyright (c) 1998 University of Cambridge + Copyright (c) 1997-1999 University of Cambridge ----------------------------------------------------------------------------- Permission is granted to anyone to use this software for any purpose on any @@ -4033,6 +4033,17 @@ in the pattern. */ resetcount = 2 + re->top_bracket * 2; if (resetcount > offsetcount) resetcount = ocount; +/* Reset the working variable associated with each extraction. These should +never be used unless previously set, but they get saved and restored, and so we +initialize them to avoid reading uninitialized locations. */ + +if (match_block.offset_vector != NULL) + { + register int *iptr = match_block.offset_vector + ocount; + register int *iend = iptr - resetcount/2 + 1; + while (--iptr >= iend) *iptr = -1; + } + /* Set up the first character to match, if available. The first_char value is never set for an anchored regular expression, but the anchoring may be forced at run time, so we have to test for anchoring. The first char may be unset for |