diff options
author | hong_zhang <hong_zhang@foxitsoftware.com> | 2016-09-12 09:54:38 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-12 09:54:38 -0700 |
commit | 25a7f3e58b6a7f3396e529f38e81f93fb87c4045 (patch) | |
tree | e429be0a5eeaecb11ac0f37e95741b6e5ed42171 /core/fxcodec | |
parent | 1c62054a42cf0759148501a36c541de5d5769d32 (diff) | |
download | pdfium-25a7f3e58b6a7f3396e529f38e81f93fb87c4045.tar.xz |
fix some uninitialized variables
BUG=627399
Review-Url: https://codereview.chromium.org/2328003002
Diffstat (limited to 'core/fxcodec')
-rw-r--r-- | core/fxcodec/codec/fx_codec_tiff.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp index 20fda6308f..2a00bb2d20 100644 --- a/core/fxcodec/codec/fx_codec_tiff.cpp +++ b/core/fxcodec/codec/fx_codec_tiff.cpp @@ -257,7 +257,7 @@ bool CCodec_TiffContext::IsSupport(const CFX_DIBitmap* pDIBitmap) const { if (TIFFIsTiled(m_tif_ctx)) return false; - uint16_t photometric; + uint16_t photometric = 0; if (!TIFFGetField(m_tif_ctx, TIFFTAG_PHOTOMETRIC, &photometric)) return false; @@ -276,7 +276,7 @@ bool CCodec_TiffContext::IsSupport(const CFX_DIBitmap* pDIBitmap) const { default: return false; } - uint16_t planarconfig; + uint16_t planarconfig = 0; if (!TIFFGetFieldDefaulted(m_tif_ctx, TIFFTAG_PLANARCONFIG, &planarconfig)) return false; @@ -284,9 +284,9 @@ bool CCodec_TiffContext::IsSupport(const CFX_DIBitmap* pDIBitmap) const { } void CCodec_TiffContext::SetPalette(CFX_DIBitmap* pDIBitmap, uint16_t bps) { - uint16_t* red_orig; - uint16_t* green_orig; - uint16_t* blue_orig; + uint16_t* red_orig = nullptr; + uint16_t* green_orig = nullptr; + uint16_t* blue_orig = nullptr; TIFFGetField(m_tif_ctx, TIFFTAG_COLORMAP, &red_orig, &green_orig, &blue_orig); for (int32_t i = (1L << bps) - 1; i >= 0; i--) { #define CVT(x) ((uint16_t)((x) >> 8)) @@ -421,8 +421,8 @@ bool CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap) { return true; } } - uint16_t spp; - uint16_t bps; + uint16_t spp = 0; + uint16_t bps = 0; TIFFGetField(m_tif_ctx, TIFFTAG_SAMPLESPERPIXEL, &spp); TIFFGetField(m_tif_ctx, TIFFTAG_BITSPERSAMPLE, &bps); uint32_t bpp = bps * spp; |