diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-19 14:41:46 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-19 14:41:46 -0800 |
commit | 052a8d963af8bb186b956057763021624332c7a8 (patch) | |
tree | 280c161a4970231eff2496f57aa8445b6c2d5405 /core/src/fxcodec/codec | |
parent | ffc26c26f0ab004fbdb05195e1686d7f33983b06 (diff) | |
download | pdfium-052a8d963af8bb186b956057763021624332c7a8.tar.xz |
Revert "Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.""
This relands the CL at https://codereview.chromium.org/1710403002
Tests passed locally.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1717603003 .
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_fax.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp index cacbc71456..36b92f06ff 100644 --- a/core/src/fxcodec/codec/fx_codec_fax.cpp +++ b/core/src/fxcodec/codec/fx_codec_fax.cpp @@ -799,9 +799,8 @@ void CCodec_FaxEncoder::Encode(uint8_t*& dest_buf, FX_DWORD& dest_size) { if (dest_bitpos) { m_DestBuf.AppendByte(last_byte); } - dest_buf = m_DestBuf.GetBuffer(); dest_size = m_DestBuf.GetSize(); - m_DestBuf.DetachBuffer(); + dest_buf = m_DestBuf.DetachBuffer(); } FX_BOOL CCodec_FaxModule::Encode(const uint8_t* src_buf, int width, |