diff options
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream_acc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.cpp b/core/fpdfapi/parser/cpdf_stream_acc.cpp index 4614dae710..dc6b1806dc 100644 --- a/core/fpdfapi/parser/cpdf_stream_acc.cpp +++ b/core/fpdfapi/parser/cpdf_stream_acc.cpp @@ -27,15 +27,16 @@ void CPDF_StreamAcc::LoadAllData(bool bRawAccess, if (!m_pStream) return; + uint32_t dwSrcSize = m_pStream->GetRawSize(); + if (dwSrcSize == 0) + return; + bool bProcessRawData = bRawAccess || !m_pStream->HasFilter(); if (bProcessRawData && m_pStream->IsMemoryBased()) { - m_dwSize = m_pStream->GetRawSize(); m_pData = m_pStream->GetInMemoryRawData(); + m_dwSize = dwSrcSize; return; } - uint32_t dwSrcSize = m_pStream->GetRawSize(); - if (dwSrcSize == 0) - return; uint8_t* pSrcData; if (m_pStream->IsMemoryBased()) { |