ossp-pkg/pcre/pcre.c 1.6 -> 1.7
--- pcre.c 2000/08/02 09:53:08 1.6
+++ pcre.c 2000/08/29 19:24:17 1.7
@@ -224,11 +224,11 @@
len = 1; \
if (md->utf8 && (c & 0xc0) == 0xc0) \
{ \
- int i; \
+ int _i; \
int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
int s = 6 - a; /* Amount to shift next byte */ \
c &= utf8_table3[a]; /* Low order bits from first byte */ \
- for (i = 1; i <= a; i++) \
+ for (_i = 1; _i <= a; _i++) \
{ \
c |= (eptr[i] & 0x3f) << s; \
s += 6; \
@@ -1753,6 +1753,11 @@
{
condref = *ptr - '0';
while (*(++ptr) != ')') condref = condref*10 + *ptr - '0';
+ if (condref == 0)
+ {
+ *errorptr = ERR35;
+ goto FAILED;
+ }
ptr++;
}
else ptr--;
@@ -2094,7 +2099,7 @@
ptrptr -> the address of the current pattern pointer
errorptr -> pointer to error message
lookbehind TRUE if this is a lookbehind assertion
- condref > 0 for OPT_CREF setting at start of conditional group
+ condref >= 0 for OPT_CREF setting at start of conditional group
reqchar -> place to put the last required character, or a negative number
countlits -> place to put the shortest literal count of any branch
cd points to the data block with tables pointers
@@ -2122,7 +2127,7 @@
/* At the start of a reference-based conditional group, insert the reference
number as an OP_CREF item. */
-if (condref > 0)
+if (condref >= 0)
{
*code++ = OP_CREF;
*code++ = condref;
|
|