mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Make sure to read memory that actually contains what we want. Bug 291020,
r+sr=peterv, a=asa
This commit is contained in:
parent
4a2763dc46
commit
180e532121
@ -2353,10 +2353,30 @@ doContent(XML_Parser parser,
|
||||
len = XmlNameLength(enc, rawName);
|
||||
if (len != tag->rawNameLength
|
||||
|| memcmp(tag->rawName, rawName, len) != 0) {
|
||||
*eventPP = rawName;
|
||||
/* BEGIN MOZILLA CHANGE (Report opening tag of mismatched closing tag) */
|
||||
/* This code is copied from the |if (endElementHandler)| block below */
|
||||
const XML_Char *localPart;
|
||||
const XML_Char *prefix;
|
||||
XML_Char *uri;
|
||||
localPart = tag->name.localPart;
|
||||
if (ns && localPart) {
|
||||
/* localPart and prefix may have been overwritten in
|
||||
tag->name.str, since this points to the binding->uri
|
||||
buffer which gets re-used; so we have to add them again
|
||||
*/
|
||||
uri = (XML_Char *)tag->name.str + tag->name.uriLen;
|
||||
/* don't need to check for space - already done in storeAtts() */
|
||||
while (*localPart) *uri++ = *localPart++;
|
||||
prefix = (XML_Char *)tag->name.prefix;
|
||||
if (ns_triplets && prefix) {
|
||||
*uri++ = namespaceSeparator;
|
||||
while (*prefix) *uri++ = *prefix++;
|
||||
}
|
||||
*uri = XML_T('\0');
|
||||
}
|
||||
mismatch = tag->name.str;
|
||||
/* END MOZILLA CHANGE */
|
||||
*eventPP = rawName;
|
||||
return XML_ERROR_TAG_MISMATCH;
|
||||
}
|
||||
--tagLevel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user