1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

entities: Report malloc failures

Fix places where malloc failures aren't reported.

Introduce new API function xmlAddEntity that returns separate error
codes.

Don't invoke global error handler for low-level errors which should be
handled by higher layers.

Invalid redelcaration warnings will be fixed later.
This commit is contained in:
Nick Wellnhofer
2023-12-10 15:25:42 +01:00
parent 2e5d273beb
commit a1f7ecaef8
5 changed files with 138 additions and 211 deletions

View File

@@ -87,6 +87,15 @@ XMLPUBFUN xmlEntityPtr
const xmlChar *content);
XMLPUBFUN void
xmlFreeEntity (xmlEntityPtr entity);
XMLPUBFUN int
xmlAddEntity (xmlDocPtr doc,
int extSubset,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content,
xmlEntityPtr *out);
XMLPUBFUN xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,