diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_syntax_parser.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h index ed760934b9..a8f6bb2033 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/parser/cpdf_syntax_parser.h @@ -11,6 +11,7 @@ #include <memory> #include <vector> +#include "core/fpdfapi/cpdf_modulemgr.h" #include "core/fxcrt/string_pool_template.h" #include "core/fxcrt/weak_ptr.h" @@ -35,6 +36,10 @@ class CPDF_SyntaxParser { void InitParserWithValidator(const RetainPtr<CPDF_ReadValidator>& pValidator, uint32_t HeaderOffset); + void SetReadBufferSize(uint32_t read_buffer_size) { + m_ReadBufferSize = read_buffer_size; + } + FX_FILESIZE GetPos() const { return m_Pos; } void SetPos(FX_FILESIZE pos) { m_Pos = std::min(pos, m_FileLen); } @@ -61,6 +66,7 @@ class CPDF_SyntaxParser { return m_pFileAccess; } uint32_t GetDirectNum(); + bool GetNextChar(uint8_t& ch); private: friend class CPDF_Parser; @@ -71,7 +77,6 @@ class CPDF_SyntaxParser { static int s_CurrentRecursionDepth; bool ReadBlockAt(FX_FILESIZE read_pos); - bool GetNextChar(uint8_t& ch); bool GetCharAtBackward(FX_FILESIZE pos, uint8_t* ch); void GetNextWordInternal(bool* bIsNumber); bool IsWholeWord(FX_FILESIZE startpos, @@ -100,6 +105,7 @@ class CPDF_SyntaxParser { FX_FILESIZE m_BufOffset; uint32_t m_WordSize; uint8_t m_WordBuffer[257]; + uint32_t m_ReadBufferSize = CPDF_ModuleMgr::kFileBufSize; }; #endif // CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ |