diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2014-07-14 16:31:37 -0700 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2014-07-14 16:31:37 -0700 |
commit | feff0db75bdb16c2597fcdf7c6a295968dc3d2af (patch) | |
tree | 18d696e4c6b02aee83ad34014ad3333ddc3979b0 /core/src/fpdfapi | |
parent | 8434565a62dcf0cabf8cdf0e35317efbb16a8d8c (diff) | |
download | pdfium-feff0db75bdb16c2597fcdf7c6a295968dc3d2af.tar.xz |
Fix uninitialized RGB in DrawShading
BUG=386730
R=palmer@chromium.org
Review URL: https://codereview.chromium.org/379923012
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index 926ce8883b..edc677736b 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -66,7 +66,7 @@ static void _DrawAxialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2B } } } - FX_FLOAT R, G, B; + FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; pCS->GetRGB(pResults, R, G, B); rgb_array[i] = FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255), FXSYS_round(G * 255), FXSYS_round(B * 255))); } @@ -755,7 +755,7 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern, CFX_AffineMat for (int i = 0; i < pColorSpace->CountComponents(); i ++) { comps[i] = pBackColor->GetNumber(i); } - FX_FLOAT R, G, B; + FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; pColorSpace->GetRGB(comps, R, G, B); background = ArgbEncode(255, (FX_INT32)(R * 255), (FX_INT32)(G * 255), (FX_INT32)(B * 255)); } |