break;
case XML_REGEXP_NOTSPACE:
neg = !neg;
+ /* Falls through. */
case XML_REGEXP_ANYSPACE:
ret = ((codepoint == '\n') || (codepoint == '\r') ||
(codepoint == '\t') || (codepoint == ' '));
break;
case XML_REGEXP_NOTINITNAME:
neg = !neg;
+ /* Falls through. */
case XML_REGEXP_INITNAME:
ret = (IS_LETTER(codepoint) ||
(codepoint == '_') || (codepoint == ':'));
break;
case XML_REGEXP_NOTNAMECHAR:
neg = !neg;
+ /* Falls through. */
case XML_REGEXP_NAMECHAR:
ret = (IS_LETTER(codepoint) || IS_DIGIT(codepoint) ||
(codepoint == '.') || (codepoint == '-') ||
break;
case XML_REGEXP_NOTDECIMAL:
neg = !neg;
+ /* Falls through. */
case XML_REGEXP_DECIMAL:
ret = xmlUCSIsCatNd(codepoint);
break;
case XML_REGEXP_REALCHAR:
neg = !neg;
+ /* Falls through. */
case XML_REGEXP_NOTREALCHAR:
ret = xmlUCSIsCatP(codepoint);
if (ret == 0)
xmlFree(exec->errString);
exec->errString = xmlStrdup(value);
exec->errState = exec->state;
- memcpy(exec->errCounts, exec->counts,
- exec->comp->nbCounters * sizeof(int));
+ if (exec->comp->nbCounters)
+ memcpy(exec->errCounts, exec->counts,
+ exec->comp->nbCounters * sizeof(int));
}
/*
}
NEXT;
xmlFAParseCharProp(ctxt);
- ctxt->atom->neg = 1;
+ if (ctxt->atom != NULL)
+ ctxt->atom->neg = 1;
if (CUR != '}') {
ERROR("Expecting '}'");
return;
return;
}
len = 1;
- } else if ((cur != 0x5B) && (cur != 0x5D)) {
+ } else if ((cur != '\0') && (cur != 0x5B) && (cur != 0x5D)) {
end = CUR_SCHAR(ctxt->cur, len);
} else {
ERROR("Expecting the end of a char range");