diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_hint_tables.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_hint_tables.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_hint_tables.cpp b/core/fpdfapi/parser/cpdf_hint_tables.cpp index e000188e7d..24abf5dd13 100644 --- a/core/fpdfapi/parser/cpdf_hint_tables.cpp +++ b/core/fpdfapi/parser/cpdf_hint_tables.cpp @@ -464,10 +464,10 @@ bool CPDF_HintTables::LoadHintStream(CPDF_Stream* pHintStream) { if (shared_hint_table_offset <= 0) return false; - CPDF_StreamAcc acc; - acc.LoadAllData(pHintStream); + auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pHintStream); + pAcc->LoadAllData(); - uint32_t size = acc.GetSize(); + uint32_t size = pAcc->GetSize(); // The header section of page offset hint table is 36 bytes. // The header section of shared object hint table is 24 bytes. // Hint table has at least 60 bytes. @@ -482,7 +482,7 @@ bool CPDF_HintTables::LoadHintStream(CPDF_Stream* pHintStream) { } CFX_BitStream bs; - bs.Init(acc.GetData(), size); + bs.Init(pAcc->GetData(), size); return ReadPageHintTable(&bs) && ReadSharedObjHintTable(&bs, shared_hint_table_offset); } |