diff options
author | kwaclaw <kwaclaw> | 2007-09-03 16:34:40 +0000 |
---|---|---|
committer | kwaclaw <kwaclaw> | 2007-09-03 16:34:40 +0000 |
commit | c537192b4b9f9cc8ee63ba3b2221632189461465 (patch) | |
tree | 91cdf84ff15864eb187791de75f629263ba21407 | |
parent | ccc20b070929c3a0dc96cda45332d6826d242352 (diff) | |
download | libexpat-c537192b4b9f9cc8ee63ba3b2221632189461465.tar.gz |
Fix for issue #1785430.
-rw-r--r-- | lib/xmlparse.c | 12 |
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; } |