Fix uninitialized RGB in LoadPalette
authorfoxit <jun_fang@foxitsoftware.com>
Mon, 7 Jul 2014 20:50:21 +0000 (13:50 -0700)
committerfoxit <jun_fang@foxitsoftware.com>
Mon, 7 Jul 2014 20:50:21 +0000 (13:50 -0700)
BUG=387506
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/361103002

core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

index 6befe11..fa8827c 100644 (file)
@@ -869,7 +869,7 @@ void CPDF_DIBSource::LoadPalette()
         FX_FLOAT color_values[3];
         color_values[0] = m_pCompData[0].m_DecodeMin;
         color_values[1] = color_values[2] = color_values[0];
-        FX_FLOAT R, G, B;
+        FX_FLOAT R=0.0f, G=0.0f, B=0.0f;
         m_pColorSpace->GetRGB(color_values, R, G, B);
         FX_ARGB argb0 = ArgbEncode(255, FXSYS_round(R * 255), FXSYS_round(G * 255), FXSYS_round(B * 255));
         color_values[0] += m_pCompData[0].m_DecodeStep;