X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcre%2Fpcre.c;h=5824040cd7f91072089a7cb8a8e5fcadb4c6dc8a;hp=1e602df4399fe39bc6c7d8e99bb77fb72fa4367c;hb=67015baf0fede8022e1109e4398f3da027fcca5e;hpb=777f23fd554b0811d16bc2323ced6fe9dc0cff72 diff --git a/pcre/pcre.c b/pcre/pcre.c index 1e602df4..5824040c 100644 --- a/pcre/pcre.c +++ b/pcre/pcre.c @@ -2660,8 +2660,13 @@ while ((c = *(++ptr)) != 0) } else class_charcount++; ptr++; + if (*ptr == 0) + { + *errorptr = ERR6; + goto PCRE_ERROR_RETURN; + } } - while (*ptr != 0 && *ptr != ']'); + while (*ptr != ']'); /* Repeats for negated single chars are handled by the general code */ @@ -3018,11 +3023,6 @@ while ((c = *(++ptr)) != 0) *errorptr = "internal error"; goto PCRE_ERROR_RETURN; } - if ((int)ptr[1] >= tables_length - ctypes_offset) - { - *errorptr = ERR6; - goto PCRE_ERROR_RETURN; - } } /* This "while" is the end of the "do" above. */