diff options
Diffstat (limited to 'core/fxcodec/bmp')
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.cpp | 12 | ||||
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.h | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp index a25afdf6c9..de97c6d527 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp @@ -663,19 +663,11 @@ void CFX_BmpDecompressor::SetInputBuffer(pdfium::span<uint8_t> src_buf) { input_buffer_ = pdfium::MakeRetain<CFX_CodecMemory>(src_buf); } -FX_FILESIZE CFX_BmpDecompressor::GetAvailInput(uint8_t** avail_buf) { +FX_FILESIZE CFX_BmpDecompressor::GetAvailInput() const { if (!input_buffer_) return 0; - FX_FILESIZE available = - input_buffer_->GetSize() - input_buffer_->GetPosition(); - if (avail_buf) { - *avail_buf = nullptr; - if (available > 0) - *avail_buf = input_buffer_->GetBuffer() + available; - } - - return available; + return input_buffer_->GetSize() - input_buffer_->GetPosition(); } void CFX_BmpDecompressor::SetHeight(int32_t signed_height) { diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.h b/core/fxcodec/bmp/cfx_bmpdecompressor.h index ed013a2a09..331a6347b4 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.h +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.h @@ -28,7 +28,7 @@ class CFX_BmpDecompressor { int32_t DecodeImage(); int32_t ReadHeader(); void SetInputBuffer(pdfium::span<uint8_t> src_buf); - FX_FILESIZE GetAvailInput(uint8_t** avail_buf); + FX_FILESIZE GetAvailInput() const; jmp_buf jmpbuf_; CFX_BmpContext* context_ptr_; |