From c537192b4b9f9cc8ee63ba3b2221632189461465 Mon Sep 17 00:00:00 2001 From: kwaclaw Date: Mon, 3 Sep 2007 16:34:40 +0000 Subject: Fix for issue #1785430. --- lib/xmlparse.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/xmlparse.c b/lib/xmlparse.c index 94e31de..20c53b1 100644 --- a/lib/xmlparse.c +++ b/lib/xmlparse.c @@ -3782,15 +3782,17 @@ doProlog(XML_Parser parser, #endif /* XML_DTD */ dtd->hasParamEntityRefs = XML_TRUE; if (startDoctypeDeclHandler) { + XML_Char *pubId; if (!XmlIsPublicId(enc, s, next, eventPP)) return XML_ERROR_PUBLICID; - doctypePubid = poolStoreString(&tempPool, enc, - s + enc->minBytesPerChar, - next - enc->minBytesPerChar); - if (!doctypePubid) + pubId = poolStoreString(&tempPool, enc, + s + enc->minBytesPerChar, + next - enc->minBytesPerChar); + if (!pubId) return XML_ERROR_NO_MEMORY; - normalizePublicId((XML_Char *)doctypePubid); + normalizePublicId(pubId); poolFinish(&tempPool); + doctypePubid = pubId; handleDefault = XML_FALSE; goto alreadyChecked; } -- cgit v1.2.1