mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-12 09:17:37 +03:00
SAX2: Fix xmlSAX2EntityDecl with empty base
Short-lived regression.
This commit is contained in:
parent
730de88b16
commit
2cc7f71016
20
SAX2.c
20
SAX2.c
@ -558,17 +558,15 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
||||
if (ctxt->input != NULL)
|
||||
base = ctxt->input->filename;
|
||||
|
||||
if (base != NULL) {
|
||||
if (xmlBuildURISafe(systemId, (const xmlChar *) base, &URI) < 0) {
|
||||
xmlSAX2ErrMemory(ctxt);
|
||||
return;
|
||||
}
|
||||
if (xmlStrlen(URI) > XML_MAX_URI_LENGTH) {
|
||||
xmlFatalErr(ctxt, XML_ERR_RESOURCE_LIMIT, "URI too long");
|
||||
xmlFree(URI);
|
||||
} else {
|
||||
ent->URI = URI;
|
||||
}
|
||||
if (xmlBuildURISafe(systemId, (const xmlChar *) base, &URI) < 0) {
|
||||
xmlSAX2ErrMemory(ctxt);
|
||||
return;
|
||||
}
|
||||
if (xmlStrlen(URI) > XML_MAX_URI_LENGTH) {
|
||||
xmlFatalErr(ctxt, XML_ERR_RESOURCE_LIMIT, "URI too long");
|
||||
xmlFree(URI);
|
||||
} else {
|
||||
ent->URI = URI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user