diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-08-16 13:29:39 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-08-16 13:29:39 +0000 |
commit | c6cacc34aeba9ca01c6d754494677ffad6c845b6 (patch) | |
tree | b713ad94121db99da97f7c0d1476c52c67ec7a7a | |
parent | ff0f411b14060f57911b57b8ca8d927280ce7274 (diff) | |
download | pcre-c6cacc34aeba9ca01c6d754494677ffad6c845b6.tar.gz |
Tidies for 7.3-RC5 prerelease
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@220 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 62 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | pcre_compile.c | 54 | ||||
-rw-r--r-- | pcreposix.c | 2 |
5 files changed, 61 insertions, 61 deletions
@@ -1,7 +1,7 @@ ChangeLog for PCRE ------------------ -Version 7.3 09-Aug-07 +Version 7.3 16-Aug-07 --------------------- 1. In the rejigging of the build system that eventually resulted in 7.1, the @@ -98,48 +98,48 @@ Version 7.3 09-Aug-07 the "low surrogate" sequence 0xD800 to 0xDFFF. Previously, PCRE allowed the full range 0 to 0x7FFFFFFF, as defined by RFC 2279. Internally, it still does: it's just the validity check that is more restrictive. - -16. Inserted checks for integer overflows during escape sequence (backslash) - processing, and also fixed erroneous offset values for syntax errors during - backslash processing. - + +16. Inserted checks for integer overflows during escape sequence (backslash) + processing, and also fixed erroneous offset values for syntax errors during + backslash processing. + 17. Fixed another case of looking too far back in non-UTF-8 mode (cf 12 above) - for patterns like [\PPP\x8a]{1,}\x80 with the subject "A\x80". - + for patterns like [\PPP\x8a]{1,}\x80 with the subject "A\x80". + 18. An unterminated class in a pattern like (?1)\c[ with a "forward reference" caused an overrun. - -19. A pattern like (?:[\PPa*]*){8,} which had an "extended class" (one with - something other than just ASCII characters) inside a group that had an - unlimited repeat caused a loop at compile time (while checking to see - whether the group could match an empty string). - + +19. A pattern like (?:[\PPa*]*){8,} which had an "extended class" (one with + something other than just ASCII characters) inside a group that had an + unlimited repeat caused a loop at compile time (while checking to see + whether the group could match an empty string). + 20. Debugging a pattern containing \p or \P could cause a crash. For example, [\P{Any}] did so. (Error in the code for printing property names.) - -21. An orphan \E inside a character class could cause a crash. -22. A repeated capturing bracket such as (A)? could cause a wild memory +21. An orphan \E inside a character class could cause a crash. + +22. A repeated capturing bracket such as (A)? could cause a wild memory reference during compilation. - -23. There are several functions in pcre_compile() that scan along a compiled - expression for various reasons (e.g. to see if it's fixed length for look + +23. There are several functions in pcre_compile() that scan along a compiled + expression for various reasons (e.g. to see if it's fixed length for look behind). There were bugs in these functions when a repeated \p or \P was - present in the pattern. These operators have additional parameters compared - with \d, etc, and these were not being taken into account when moving along + present in the pattern. These operators have additional parameters compared + with \d, etc, and these were not being taken into account when moving along the compiled data. Specifically: - - (a) A item such as \p{Yi}{3} in a lookbehind was not treated as fixed - length. - - (b) An item such as \pL+ within a repeated group could cause crashes or + + (a) A item such as \p{Yi}{3} in a lookbehind was not treated as fixed + length. + + (b) An item such as \pL+ within a repeated group could cause crashes or loops. - + (c) A pattern such as \p{Yi}+(\P{Yi}+)(?1) could give an incorrect - "reference to non-existent subpattern" error. - + "reference to non-existent subpattern" error. + 24. A repeated \S or \W in UTF-8 mode could give wrong answers when multibyte - characters were involved (for example /\S{2}/8g with "A\x{a3}BC"). + characters were involved (for example /\S{2}/8g with "A\x{a3}BC"). Version 7.2 19-Jun-07 @@ -2,7 +2,7 @@ News about PCRE releases ------------------------ -Release 7.3 09-Aug-07 +Release 7.3 16-Aug-07 --------------------- Most changes are bug fixes. Some that are not: diff --git a/configure.ac b/configure.ac index c9abf12..41dae7b 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl empty. m4_define(pcre_major, [7]) m4_define(pcre_minor, [3]) m4_define(pcre_prerelease, [-RC5]) -m4_define(pcre_date, [2007-08-15]) +m4_define(pcre_date, [2007-08-16]) # Libtool shared library interface versions (current:revision:age) m4_define(libpcre_version, [0:1:0]) diff --git a/pcre_compile.c b/pcre_compile.c index 7bc7ac9..773a150 100644 --- a/pcre_compile.c +++ b/pcre_compile.c @@ -283,7 +283,7 @@ static const char *error_texts[] = { "(*VERB) with an argument is not supported", /* 60 */ "(*VERB) not recognized", - "number is too big" + "number is too big" }; @@ -524,12 +524,12 @@ else c = 0; while ((digitab[ptr[1]] & ctype_digit) != 0) c = c * 10 + *(++ptr) - '0'; - + if (c < 0) { *errorcodeptr = ERR61; break; - } + } if (c == 0 || (braced && *(++ptr) != '}')) { @@ -574,8 +574,8 @@ else if (c < 0) { *errorcodeptr = ERR61; - break; - } + break; + } if (c < 10 || c <= bracount) { c = -(ESC_REF + c); @@ -950,7 +950,7 @@ for (; *ptr != 0; ptr++) { while (*(++ptr) != ']') { - if (*ptr == 0) return -1; + if (*ptr == 0) return -1; if (*ptr == '\\') { if (*(++ptr) == 0) return -1; @@ -1194,7 +1194,7 @@ for (;;) case OP_TYPEEXACT: branchlength += GET2(cc,1); - if (cc[3] == OP_PROP || cc[3] == OP_NOTPROP) cc += 2; + if (cc[3] == OP_PROP || cc[3] == OP_NOTPROP) cc += 2; cc += 4; break; @@ -1303,8 +1303,8 @@ for (;;) code += _pcre_OP_lengths[c]; } - /* Otherwise, we can get the item's length from the table, except that for - repeated character types, we have to test for \p and \P, which have an extra + /* Otherwise, we can get the item's length from the table, except that for + repeated character types, we have to test for \p and \P, which have an extra two bytes of parameters. */ else @@ -1325,17 +1325,17 @@ for (;;) case OP_TYPEPOSQUERY: case OP_TYPEPOSUPTO: if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; - break; - } - + break; + } + /* Add in the fixed length from the table */ - + code += _pcre_OP_lengths[c]; - + /* In UTF-8 mode, opcodes that are followed by a character may be followed by a multi-byte character. The length in the table is a minimum, so we have to arrange to skip the extra bytes. */ - + #ifdef SUPPORT_UTF8 if (utf8) switch(c) { @@ -1386,15 +1386,15 @@ for (;;) register int c = *code; if (c == OP_END) return NULL; if (c == OP_RECURSE) return code; - + /* XCLASS is used for classes that cannot be represented just by a bit map. This includes negated single high-valued characters. The length in the table is zero; the actual length is stored in the compiled code. */ if (c == OP_XCLASS) code += GET(code, 1); - /* Otherwise, we can get the item's length from the table, except that for - repeated character types, we have to test for \p and \P, which have an extra + /* Otherwise, we can get the item's length from the table, except that for + repeated character types, we have to test for \p and \P, which have an extra two bytes of parameters. */ else @@ -1415,17 +1415,17 @@ for (;;) case OP_TYPEPOSQUERY: case OP_TYPEPOSUPTO: if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; - break; - } - + break; + } + /* Add in the fixed length from the table */ code += _pcre_OP_lengths[c]; - + /* In UTF-8 mode, opcodes that are followed by a character may be followed by a multi-byte character. The length in the table is a minimum, so we have to arrange to skip the extra bytes. */ - + #ifdef SUPPORT_UTF8 if (utf8) switch(c) { @@ -1524,7 +1524,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE /* Check for quantifiers after a class. XCLASS is used for classes that cannot be represented just by a bit map. This includes negated single high-valued characters. The length in _pcre_OP_lengths[] is zero; the - actual length is stored in the compiled code, so we must update "code" + actual length is stored in the compiled code, so we must update "code" here. */ #ifdef SUPPORT_UTF8 @@ -2722,7 +2722,7 @@ for (;; ptr++) else inescq = TRUE; continue; } - else if (-c == ESC_E) continue; /* Ignore orphan \E */ + else if (-c == ESC_E) continue; /* Ignore orphan \E */ if (c < 0) { @@ -4798,7 +4798,7 @@ for (;; ptr++) } /* In the pre-compile phase, update the length by the length of the group, - less the brackets at either end. Then reduce the compiled code to just a + less the brackets at either end. Then reduce the compiled code to just a set of non-capturing brackets so that it doesn't use much memory if it is duplicated by a quantifier.*/ @@ -4810,7 +4810,7 @@ for (;; ptr++) goto FAILED; } *lengthptr += length_prevgroup - 2 - 2*LINK_SIZE; - *code++ = OP_BRA; + *code++ = OP_BRA; PUTINC(code, 0, 1 + LINK_SIZE); *code++ = OP_KET; PUTINC(code, 0, 1 + LINK_SIZE); diff --git a/pcreposix.c b/pcreposix.c index a0a43aa..83263de 100644 --- a/pcreposix.c +++ b/pcreposix.c @@ -125,7 +125,7 @@ static const int eint[] = { REG_INVARG, /* inconsistent NEWLINE options */ REG_BADPAT, /* \g is not followed followed by an (optionally braced) non-zero number */ REG_BADPAT, /* (?+ or (?- must be followed by a non-zero number */ - REG_BADPAT /* number is too big */ + REG_BADPAT /* number is too big */ }; /* Table of texts corresponding to POSIX error codes */ |