From eed247e9cb3b0e9ce5dcb8bf6ee7673c9dd3e544 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 19 Jul 2017 14:12:03 -0400 Subject: Converting CFX_ByteTextBuf to ostringstream in SAX. Respin of https://pdfium-review.googlesource.com/c/6592 with fixes that avoid invalid reads. Bug: pdfium:731 Change-Id: I9395063505ba1a5c610e21b089ab8aa1a0a5b86f Reviewed-on: https://pdfium-review.googlesource.com/8290 Reviewed-by: Tom Sepez Commit-Queue: Henrique Nakashima --- core/fxcrt/xml/cfx_saxcontext.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/xml/cfx_saxcontext.h') diff --git a/core/fxcrt/xml/cfx_saxcontext.h b/core/fxcrt/xml/cfx_saxcontext.h index 7afebed98d..fcc889f7a3 100644 --- a/core/fxcrt/xml/cfx_saxcontext.h +++ b/core/fxcrt/xml/cfx_saxcontext.h @@ -7,15 +7,18 @@ #ifndef CORE_FXCRT_XML_CFX_SAXCONTEXT_H_ #define CORE_FXCRT_XML_CFX_SAXCONTEXT_H_ +#include + #include "core/fxcrt/fx_basic.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/xml/cfx_saxreader.h" class CFX_SAXContext { public: - CFX_SAXContext() : m_eNode(CFX_SAXItem::Type::Unknown) {} + CFX_SAXContext(); + ~CFX_SAXContext(); - CFX_ByteTextBuf m_TextBuf; + std::ostringstream m_TextBuf; CFX_ByteString m_bsTagName; CFX_SAXItem::Type m_eNode; }; -- cgit v1.2.3