aboutsummaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-10-28 23:06:32 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-10-28 23:06:32 +0000
commite4e3f5d8af30f4d12802324a318acc56dce83cb8 (patch)
tree0c7861bd77a1366f65f5f8e190ee9769ae3c8fde /parser.c
parent652f9aa9661b70c6d55b8e51ceae78af15c8d036 (diff)
downloadandroid_external_libxml2-e4e3f5d8af30f4d12802324a318acc56dce83cb8.tar.gz
android_external_libxml2-e4e3f5d8af30f4d12802324a318acc56dce83cb8.tar.bz2
android_external_libxml2-e4e3f5d8af30f4d12802324a318acc56dce83cb8.zip
preparing release 2.6.1, updated and regenerated docs and APIs cleanup and
* configure.in NEWS doc/*: preparing release 2.6.1, updated and regenerated docs and APIs * parser.c: cleanup and last change to fix #123105 Daniel
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 171c6233..ce6272ce 100644
--- a/parser.c
+++ b/parser.c
@@ -10642,6 +10642,11 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
ctxt->vctxt.nodeNr = 0;
ctxt->vctxt.nodeMax = 0;
ctxt->vctxt.node = NULL;
+ if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
+ ctxt->dict = ctx->dict;
+ ctxt->dictNames = ctx->dictNames;
+ ctxt->attsDefault = ctx->attsDefault;
+ ctxt->attsSpecial = ctx->attsSpecial;
xmlParseContent(ctxt);
@@ -10680,6 +10685,9 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
ret = 0;
}
ctxt->sax = oldsax;
+ ctxt->dict = NULL;
+ ctxt->attsDefault = NULL;
+ ctxt->attsSpecial = NULL;
xmlFreeParserCtxt(ctxt);
newDoc->intSubset = NULL;
newDoc->extSubset = NULL;
@@ -12129,7 +12137,9 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
* @filename: an optional file name or URI
* @encoding: the document encoding, or NULL
*
- * Reset a parser context
+ * Reset a push parser context
+ *
+ * Returns 0 in case of success and 1 in case of error
*/
int
xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,
@@ -12139,6 +12149,9 @@ xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,
xmlParserInputBufferPtr buf;
xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+ if (ctxt == NULL)
+ return(1);
+
if ((encoding == NULL) && (chunk != NULL) && (size >= 4))
enc = xmlDetectCharEncoding((const xmlChar *) chunk, size);