24 #define EVIL_REGEX "^(a+)+$"
29 <h1>Does %s match %s?</h1> <br/>\n\
36 return strlen(
HTML) + 200;
40 const char *pcreErrorStr;
42 pcre *reCompiled = pcre_compile(
EVIL_REGEX, 0, &pcreErrorStr, &errOffset, NULL);
45 pcreExtra.match_limit = -1;
46 pcreExtra.match_limit_recursion = -1;
47 pcreExtra.flags = PCRE_EXTRA_MATCH_LIMIT | PCRE_EXTRA_MATCH_LIMIT_RECURSION;
49 int len = strlen(to_match);
52 int ret = pcre_exec(reCompiled, &pcreExtra, to_match, len, 0, 0, x, 1);
56 sprintf(resp,
"%s",
"NO");
58 sprintf(resp,
"%s",
"YES");
61 pcre_free(reCompiled);
int regex_html(char *to_match, char *htmlDoc)