summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwaclaw <kwaclaw>2007-09-03 16:34:40 +0000
committerkwaclaw <kwaclaw>2007-09-03 16:34:40 +0000
commitc537192b4b9f9cc8ee63ba3b2221632189461465 (patch)
tree91cdf84ff15864eb187791de75f629263ba21407
parentccc20b070929c3a0dc96cda45332d6826d242352 (diff)
downloadlibexpat-c537192b4b9f9cc8ee63ba3b2221632189461465.tar.gz
Fix for issue #1785430.
-rw-r--r--lib/xmlparse.c12
1 files 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;
}