summaryrefslogtreecommitdiff
path: root/xmlregexp.c
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2015-08-25 21:55:55 +0200
committerRaphaël Hertzog <hertzog@debian.org>2015-08-25 21:55:55 +0200
commit21ee18bdbc9a9d4500e12a1399d51c593b8b31d4 (patch)
tree35c498d3ec731bcf7b90ce66bce68ecd54659250 /xmlregexp.c
parentde338c1adfa336ddb5177ceb5c63bcd868a0ebc7 (diff)
parent7300193becde71a344c8ac0973dc290fa24d800d (diff)
downloadlibxml2-21ee18bdbc9a9d4500e12a1399d51c593b8b31d4.tar.gz
Merge tag 'upstream/2.9.1+dfsg1'
Upstream version 2.9.1+dfsg1
Diffstat (limited to 'xmlregexp.c')
-rw-r--r--xmlregexp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlregexp.c b/xmlregexp.c
index 3e912ab..1f9911c 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -3162,10 +3162,8 @@ xmlFARegExecRollBack(xmlRegExecCtxtPtr exec) {
exec->status = -6;
return;
}
- if (exec->counts) {
- memcpy(exec->counts, exec->rollbacks[exec->nbRollbacks].counts,
+ memcpy(exec->counts, exec->rollbacks[exec->nbRollbacks].counts,
exec->comp->nbCounters * sizeof(int));
- }
}
#ifdef DEBUG_REGEXP_EXEC
@@ -4093,7 +4091,7 @@ rollback:
*/
exec->determinist = 0;
xmlFARegExecRollBack(exec);
- if ((exec->inputStack != NULL ) && (exec->status == 0)) {
+ if (exec->status == 0) {
value = exec->inputStack[exec->index].value;
data = exec->inputStack[exec->index].data;
#ifdef DEBUG_PUSH
@@ -4308,7 +4306,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
(*nbval)++;
}
} else {
- if ((exec->comp != NULL) && (exec->comp->states[trans->to] != NULL) &&
+ if ((exec->comp->states[trans->to] != NULL) &&
(exec->comp->states[trans->to]->type !=
XML_REGEXP_SINK_STATE)) {
if (atom->neg)
@@ -5709,6 +5707,8 @@ xmlAutomataNewTransition(xmlAutomataPtr am, xmlAutomataStatePtr from,
if (atom == NULL)
return(NULL);
atom->data = data;
+ if (atom == NULL)
+ return(NULL);
atom->valuep = xmlStrdup(token);
if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {