summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-09-08 17:28:16 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-09-08 17:28:16 -0700
commit0fb1b3d3076bd22dbdc346b9b74f122d14ad070e (patch)
tree19d0f4afc6c61c846ec8850c7cae08779c0b1330 /core/src/fpdfapi
parentedbf8ac5c5381a9e0dcc32032eafb823f571d7df (diff)
downloadpdfium-0fb1b3d3076bd22dbdc346b9b74f122d14ad070e.tar.xz
Fix un-initialized R G B value
BUG=411163 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/551513005
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp4
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 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)));
}