diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-06 12:06:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 12:06:35 -0700 |
commit | 4e20094dbb2ea942734b8986fa9a60d2f3ccbb1b (patch) | |
tree | ebb642f2387b2a5ab4335944c549eccd1d142124 /core/fxcodec | |
parent | 6fe7d2174a47107578da912299c93b4dfb9f2add (diff) | |
download | pdfium-4e20094dbb2ea942734b8986fa9a60d2f3ccbb1b.tar.xz |
Rename FX_SAFE_DWORD to FX_SAFE_UINT32
We removed the FX_DWORD typedef in favour of uint32_t. This CL cleans up the
FX_SAFE_DWORD naming to match.
BUG=pdfium:81, pdfium:470
Review URL: https://codereview.chromium.org/1861403002
Diffstat (limited to 'core/fxcodec')
-rw-r--r-- | core/fxcodec/codec/fx_codec.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpeg.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpx_opj.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Image.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index 79e5da27c8..ef9414dbe5 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -294,7 +294,7 @@ FX_BOOL CCodec_RLScanlineDecoder::Create(const uint8_t* src_buf, m_nComps = nComps; m_bpc = bpc; // Aligning the pitch to 4 bytes requires an integer overflow check. - FX_SAFE_DWORD pitch = width; + FX_SAFE_UINT32 pitch = width; pitch *= nComps; pitch *= bpc; pitch += 31; diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index ce39038438..33ebf1ba20 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -142,7 +142,7 @@ static void _JpegEncode(const CFX_DIBSource* pSource, uint32_t pitch = pSource->GetPitch(); uint32_t width = pdfium::base::checked_cast<uint32_t>(pSource->GetWidth()); uint32_t height = pdfium::base::checked_cast<uint32_t>(pSource->GetHeight()); - FX_SAFE_DWORD safe_buf_len = width; + FX_SAFE_UINT32 safe_buf_len = width; safe_buf_len *= height; safe_buf_len *= nComponents; safe_buf_len += 1024; diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp index 27b645c137..18d2c8d827 100644 --- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -301,7 +301,7 @@ void sycc420_to_rgb(opj_image_t* img) { OPJ_UINT32 crw = img->comps[2].w; bool extw = sycc420_must_extend_cbcr(yw, cbw); bool exth = sycc420_must_extend_cbcr(yh, cbh); - FX_SAFE_DWORD safeSize = yw; + FX_SAFE_UINT32 safeSize = yw; safeSize *= yh; if (!safeSize.IsValid()) return; diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp index 7297199112..6a1c060b75 100644 --- a/core/fxcodec/jbig2/JBig2_Image.cpp +++ b/core/fxcodec/jbig2/JBig2_Image.cpp @@ -216,7 +216,7 @@ void CJBig2_Image::expand(int32_t h, FX_BOOL v) { uint32_t dwH = pdfium::base::checked_cast<uint32_t>(h); uint32_t dwStride = pdfium::base::checked_cast<uint32_t>(m_nStride); uint32_t dwHeight = pdfium::base::checked_cast<uint32_t>(m_nHeight); - FX_SAFE_DWORD safeMemSize = dwH; + FX_SAFE_UINT32 safeMemSize = dwH; safeMemSize *= dwStride; if (!safeMemSize.IsValid()) { return; |