X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=pcre%2Fpcre.c;h=4f8f82cd4ec6b7ef1a89cf3ce673bff719a77a16;hb=7fb7e28f2c2b3c45fc856210752f1e652f7132f0;hp=38d0113be0e4d2c26abb5c316e7adf7c2199cf59;hpb=7561fe12f24fdb42375f78ba965e952c3841fbeb;p=privoxy.git diff --git a/pcre/pcre.c b/pcre/pcre.c index 38d0113b..4f8f82cd 100644 --- a/pcre/pcre.c +++ b/pcre/pcre.c @@ -730,7 +730,7 @@ if (*p == '}') max = min; else /* Do paranoid checks, then fill in the required variables, and pass back the pointer to the terminating '}'. */ -if (min > 65535 || max > 65535) +if (min < 0 || min > 65535 || max < -1 || max > 65535) *errorptr = ERR5; else { @@ -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 */