diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-03-11 11:21:28 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-03-11 11:21:28 +0000 |
commit | 39eb88b4ca9c13de82e631faaccd5300514bb8bd (patch) | |
tree | 8a671a6a472990776ce1a2b83ae06615c99aa82a /SAX.c | |
parent | 5add868b2e79a304c8d99be57bc446f94798af84 (diff) | |
download | libxml2-39eb88b4ca9c13de82e631faaccd5300514bb8bd.tar.gz |
fix some recursion problems introduced in the last release. more debugging
* SAX.c parser.c: fix some recursion problems introduced in the
last release.
* relaxng.c: more debugging of the RNG validation engine, still
problems though.
Daniel
Diffstat (limited to 'SAX.c')
-rw-r--r-- | SAX.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -378,14 +378,26 @@ getEntity(void *ctx, const xmlChar *name) ((ctxt->validate) || (ctxt->replaceEntities)) && (ret->children == NULL) && (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { + int val; + /* * for validation purposes we really need to fetch and * parse the external entity */ xmlNodePtr children; - xmlParseCtxtExternalEntity(ctxt, ret->URI, ret->ExternalID, &children); - xmlAddChildList((xmlNodePtr) ret, children); + val = xmlParseCtxtExternalEntity(ctxt, ret->URI, + ret->ExternalID, &children); + if (val == 0) { + xmlAddChildList((xmlNodePtr) ret, children); + } else { + ctxt->sax->error(ctxt, + "Failure to process entity %s\n", name); + ctxt->wellFormed = 0; + ctxt->valid = 0; + ctxt->validate = 0; + return(NULL); + } ret->owner = 1; } return(ret); |