gecko-dev/parser/htmlparser
Peter Van der Beken 4641d9bef3 Bug 1751796 - XML parsererror eats two first letters. r=bholley
We were calling XML_GetCurrentColumnNumber after ParseBuffer caused Expat
to consume some data. XML_GetCurrentColumnNumber uses the buffer that was
last passed to Expat. Before Expat was put in an RLBox sandbox the caller
of ParseBuffer would keep the data in the scanner string until after the
call to XML_GetCurrentColumnNumber. Now that we copy the data into the
RLBox sandbox the data is freed when the TransferBuffer in ParseBuffer
goes out of scope, so in the caller of ParseBuffer the call to
XML_GetCurrentColumnNumber would cause us to read freed memory inside the
sandbox. Moving the call to XML_GetCurrentColumnNumber to inside
ParseBuffer, when TransferBuffer is still in scope, solves the issue.

Differential Revision: https://phabricator.services.mozilla.com/D141795
2022-04-05 14:10:11 +00:00
..
tests Bug 1751796 - XML parsererror eats two first letters. r=bholley 2022-04-05 14:10:11 +00:00
CNavDTD.cpp Bug 1749935 - Remove GetDTD. r=hsivonen 2022-02-14 13:03:52 +00:00
CNavDTD.h
CParserContext.cpp Bug 1749935 - Remove nsITokenizer. r=hsivonen 2022-02-14 13:03:50 +00:00
CParserContext.h Bug 1749935 - Remove nsITokenizer. r=hsivonen 2022-02-14 13:03:50 +00:00
moz.build Bug 1749935 - Create nsParser directly instead of with a CID. r=hsivonen 2022-02-14 13:03:51 +00:00
nsElementTable.cpp
nsElementTable.h
nsExpatDriver.cpp Bug 1751796 - XML parsererror eats two first letters. r=bholley 2022-04-05 14:10:11 +00:00
nsExpatDriver.h Bug 1751796 - XML parsererror eats two first letters. r=bholley 2022-04-05 14:10:11 +00:00
nsHTMLTagList.h
nsHTMLTags.cpp Bug 1749935 - Create nsParser directly instead of with a CID. r=hsivonen 2022-02-14 13:03:51 +00:00
nsHTMLTags.h Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert 2021-03-25 10:19:44 +00:00
nsIContentSink.h Bug 1749935 - Mark nsIParser::WillResume(Impl) as infallible. r=hsivonen 2022-02-14 13:03:43 +00:00
nsIDTD.h Bug 1749935 - Remove GetDTD. r=hsivonen 2022-02-14 13:03:52 +00:00
nsIExpatSink.idl
nsIFragmentContentSink.h Bug 1749935 - Remove nsIParser::ParseFragment/Reset. r=hsivonen 2022-02-14 13:03:51 +00:00
nsIHTMLContentSink.h
nsIParser.h Bug 1749935 - Remove GetDTD. r=hsivonen 2022-02-14 13:03:52 +00:00
nsParser.cpp Bug 1749935 - Simplify nsParser::Initialize. r=hsivonen 2022-02-14 13:03:52 +00:00
nsParser.h Bug 1749935 - Simplify nsParser::Initialize. r=hsivonen 2022-02-14 13:03:52 +00:00
nsParserBase.h Bug 1749935 - Remove nsIParser::GetChannel. r=hsivonen 2022-02-14 13:03:44 +00:00
nsParserConstants.h
nsParserMsgUtils.cpp
nsParserMsgUtils.h
nsRLBoxExpatDriver.h Bug 1744460 part 2 - Update woff2 RLBoxSandboxPool to track minimum sandbox size r=bholley 2021-12-09 00:01:17 +00:00
nsScanner.cpp Bug 1749935 - Make mSlidingBuffer a UniquePtr. r=hsivonen 2022-02-14 13:03:48 +00:00
nsScanner.h Bug 1749935 - Make mSlidingBuffer a UniquePtr. r=hsivonen 2022-02-14 13:03:48 +00:00
nsScannerString.cpp
nsScannerString.h