From 0fb1b3d3076bd22dbdc346b9b74f122d14ad070e Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Mon, 8 Sep 2014 17:28:16 -0700 Subject: Fix un-initialized R G B value BUG=411163 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/551513005 --- core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 4 ++-- 1 file 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 b54f27a4c9..9d9d9ecfd1 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -146,7 +146,7 @@ static void _DrawRadialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2 } } } - 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))); } @@ -275,7 +275,7 @@ static void _DrawFuncShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2Bi } } } - FX_FLOAT R, G, B; + FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; pCS->GetRGB(pResults, R, G, B); dib_buf[column] = FXARGB_TODIB(FXARGB_MAKE(alpha, (FX_INT32)(R * 255), (FX_INT32)(G * 255), (FX_INT32)(B * 255))); } -- cgit v1.2.3