summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cxml_parser.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-28 13:44:31 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-28 21:58:06 +0000
commit84faa032e327ad61e38197114a164e969051b5af (patch)
tree12839bd4a16e77b9ad489c56caf85e8709e7261e /core/fxcrt/xml/cxml_parser.h
parent9ebdfcb1cb8f7498afa4a2680b944d13a9fac6a5 (diff)
downloadpdfium-84faa032e327ad61e38197114a164e969051b5af.tar.xz
Limit recursion in CXML_Parser::ParseElement().
BUG=chromium:716526 Change-Id: Idbe4624ab2193cee2931c69ed023dd2c1679d124 Reviewed-on: https://pdfium-review.googlesource.com/4615 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cxml_parser.h')
-rw-r--r--core/fxcrt/xml/cxml_parser.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcrt/xml/cxml_parser.h b/core/fxcrt/xml/cxml_parser.h
index 371edf2ebb..33bd711ee1 100644
--- a/core/fxcrt/xml/cxml_parser.h
+++ b/core/fxcrt/xml/cxml_parser.h
@@ -42,6 +42,10 @@ class CXML_Parser {
void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement);
private:
+ std::unique_ptr<CXML_Element> ParseElementInternal(CXML_Element* pParent,
+ bool bStartTag,
+ int nDepth);
+
std::unique_ptr<CXML_DataBufAcc> m_pDataAcc;
FX_FILESIZE m_nOffset;
const uint8_t* m_pBuffer;