mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +03:00
Fix undefined behavior in xmlRegExecPushStringInternal
It's stupid, but the behavior of memcpy(NULL, NULL, 0) is undefined.
This commit is contained in:
parent
474967241c
commit
34e445674d
@ -4089,8 +4089,9 @@ rollback:
|
||||
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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user