From f3227aeb0b4243a0ce4da5f6adfa1ebbfc902d17 Mon Sep 17 00:00:00 2001 From: foxit Date: Mon, 7 Jul 2014 14:03:18 -0700 Subject: Fix uninitialized nresults and RGB BUG=387785 R=palmer@chromium.org Review URL: https://codereview.chromium.org/362403002 --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 2 +- core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp index 3dad6be129..867b245a50 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -1027,7 +1027,7 @@ FX_BOOL CPDF_DeviceNCS::GetRGB(FX_FLOAT* pBuf, FX_FLOAT& R, FX_FLOAT& G, FX_FLOA return FALSE; } CFX_FixedBufGrow results(m_pFunc->CountOutputs()); - int nresults; + int nresults = 0; m_pFunc->Call(pBuf, m_nComponents, results, nresults); if (nresults == 0) { return FALSE; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index 4b4f929179..0bf6311b19 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -710,7 +710,7 @@ static void _DrawCoonPatchMeshes(FX_BOOL bTensor, CFX_DIBitmap* pBitmap, CFX_Aff pObject2Bitmap->Transform(coords[i].x, coords[i].y); } for (i = iStartColor; i < 4; i ++) { - FX_FLOAT r, g, b; + FX_FLOAT r=0.0f, g=0.0f, b=0.0f; stream.GetColor(r, g, b); patch.patch_colors[i].comp[0] = (FX_INT32)(r * 255); patch.patch_colors[i].comp[1] = (FX_INT32)(g * 255); -- cgit v1.2.3