static const char *pattern =
"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?";
pcrecpp::RE re(pattern);
- re.FullMatch(input->c_str(), &val[0], &val[1],
+ if (!re.FullMatch(input->c_str(), &val[0], &val[1],
&val[2], &val[3], &val[4],
- &val[5], &val[6], &val[7], &val[8]);
-
+ &val[5], &val[6], &val[7], &val[8])) {
+ LogDebug("Error: attribute parsing failed.");
+ return false;
+ }
#ifdef ALL_LOGS
for (int i = 0; i < 9; i++) {
LogDebug("val " << i << " :" << val[i]);