mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +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:
@ -4089,8 +4089,9 @@ rollback:
|
|||||||
xmlFree(exec->errString);
|
xmlFree(exec->errString);
|
||||||
exec->errString = xmlStrdup(value);
|
exec->errString = xmlStrdup(value);
|
||||||
exec->errState = exec->state;
|
exec->errState = exec->state;
|
||||||
memcpy(exec->errCounts, exec->counts,
|
if (exec->comp->nbCounters)
|
||||||
exec->comp->nbCounters * sizeof(int));
|
memcpy(exec->errCounts, exec->counts,
|
||||||
|
exec->comp->nbCounters * sizeof(int));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user