1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

malloc-fail: Report malloc failure in xmlRegEpxFromParse

Also check whether malloc failures are reported when fuzzing.
This commit is contained in:
Nick Wellnhofer
2023-09-22 17:03:56 +02:00
parent d94f0b0ba2
commit b7d56ef7f1
4 changed files with 29 additions and 7 deletions

View File

@@ -476,7 +476,11 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) {
ret->determinist = ctxt->determinist;
ret->flags = ctxt->flags;
if (ret->determinist == -1) {
xmlRegexpIsDeterminist(ret);
if (xmlRegexpIsDeterminist(ret) < 0) {
xmlRegexpErrMemory(ctxt, "checking determinism");
xmlFree(ret);
return(NULL);
}
}
if ((ret->determinist != 0) &&