summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-11 23:09:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-11 23:09:10 +0000
commita1188905b85a84d950f94df0f229b9f1d5784c61 (patch)
tree17d39fceb0d26c4313085dd3fad65e5c6f3babe1 /core/fxcodec
parentc7f66edd224446deefe68506b7ebed871eb5c8c2 (diff)
downloadpdfium-a1188905b85a84d950f94df0f229b9f1d5784c61.tar.xz
Use pdfium::Vector2D in CCodec_FaxEncoder ctor.
Instead of manual CHECKs. Change-Id: I387008bea88cba9b9b3e813631d9fc02ac7eb3a9 Reviewed-on: https://pdfium-review.googlesource.com/c/43932 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/ccodec_faxmodule.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/fxcodec/codec/ccodec_faxmodule.cpp b/core/fxcodec/codec/ccodec_faxmodule.cpp
index 905f6472d2..6a07d5605b 100644
--- a/core/fxcodec/codec/ccodec_faxmodule.cpp
+++ b/core/fxcodec/codec/ccodec_faxmodule.cpp
@@ -8,7 +8,6 @@
#include <algorithm>
#include <iterator>
-#include <limits>
#include <memory>
#include <vector>
@@ -678,11 +677,9 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf,
int height,
int pitch)
: m_Cols(width), m_Rows(height), m_Pitch(pitch), m_pSrcBuf(src_buf) {
- CHECK(pitch > 0);
- CHECK(pitch < std::numeric_limits<int>::max() / 8);
m_RefLine.resize(pitch);
std::fill(std::begin(m_RefLine), std::end(m_RefLine), 0xff);
- m_LineBuf.resize(8 * m_Pitch);
+ m_LineBuf = pdfium::Vector2D<uint8_t>(8, m_Pitch);
m_DestBuf.SetAllocStep(10240);
}