summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-18 10:03:38 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-18 10:03:38 +0000
commit77b62a421481e0547788d4c0dc7539ac7f41d85b (patch)
tree9c647dbb84db9b8b06c65707193249405c392fcc
parentcee5883791741dddc0081fd1dd0f674678e1f1c8 (diff)
downloadpcre-77b62a421481e0547788d4c0dc7539ac7f41d85b.tar.gz
Renamed isnumber in pcre_compile to avoid a clash with ctype.h in Macs, and
fixed a bug in fixed-length calculation for lookbehinds that would show up only in quite long subpatterns. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@807 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac2
-rw-r--r--pcre_compile.c9
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 81eaf17..b410d0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
ChangeLog for PCRE
------------------
+Version 8.22
+------------
+
+1. Renamed "isnumber" as "is_a_number" because in some Mac environments this
+ name is defined in ctype.h.
+
+2. Fixed a bug in the code for calculating the fixed length of lookbehind
+ assertions.
+
+
Version 8.21 12-Dec-2011
------------------------
diff --git a/configure.ac b/configure.ac
index 260970f..510d5de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
-m4_define(pcre_minor, [21])
+m4_define(pcre_minor, [22])
m4_define(pcre_prerelease, [])
m4_define(pcre_date, [2011-12-12])
diff --git a/pcre_compile.c b/pcre_compile.c
index ca07db1..27aa0bd 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -1655,7 +1655,8 @@ for (;;)
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
do cc += GET(cc, 1); while (*cc == OP_ALT);
- /* Fall through */
+ cc += _pcre_OP_lengths[*cc];
+ break;
/* Skip over things that don't match chars */
@@ -6450,10 +6451,10 @@ for (;; ptr++)
if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS)
{
- BOOL isnumber = TRUE;
+ BOOL is_a_number = TRUE;
for (p = ptr + 1; *p != 0 && *p != terminator; p++)
{
- if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE;
+ if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE;
if ((cd->ctypes[*p] & ctype_word) == 0) break;
}
if (*p != terminator)
@@ -6461,7 +6462,7 @@ for (;; ptr++)
*errorcodeptr = ERR57;
break;
}
- if (isnumber)
+ if (is_a_number)
{
ptr++;
goto HANDLE_NUMERICAL_RECURSION;