diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2018-06-06 12:31:18 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-06 12:31:18 +0000 |
commit | eababa10789bc0d73a325291e2854090ee3896cd (patch) | |
tree | 67bb315c3e405c622c9fac40f0f473b4ec2b8fc1 /core/fpdfapi/parser/cpdf_stream.h | |
parent | c22d671728605bc614dc84ec6a42a5647808b30d (diff) | |
download | pdfium-eababa10789bc0d73a325291e2854090ee3896cd.tar.xz |
Use CPDF_StreamAcc to data access of CPDF_Stream.
Change-Id: I68b88e013ac542f245dbe7b6889799c814d46eb8
Reviewed-on: https://pdfium-review.googlesource.com/33690
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h index cc3dcac227..7e98f300ba 100644 --- a/core/fpdfapi/parser/cpdf_stream.h +++ b/core/fpdfapi/parser/cpdf_stream.h @@ -37,7 +37,9 @@ class CPDF_Stream : public CPDF_Object { bool WriteTo(IFX_ArchiveStream* archive) const override; uint32_t GetRawSize() const { return m_dwSize; } - uint8_t* GetRawData() const { return m_pDataBuf.get(); } + // Will be null in case when stream is not memory based. + // Use CPDF_StreamAcc to data access in all cases. + uint8_t* GetInMemoryRawData() const { return m_pDataBuf.get(); } // Does not takes ownership of |pData|, copies into internally-owned buffer. void SetData(const uint8_t* pData, uint32_t size); |