summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2014-11-06 15:03:46 -0800
committerTom Sepez <tsepez@chromium.org>2014-11-06 15:03:46 -0800
commit90a7c2280f80b3728a3a051b6848678803aaf49e (patch)
tree0d2fe0f4475e284a8d8a5ca941c4a9dbcac01f5f
parent8a605d2407a104dfafaee392caf8540a3cafed2c (diff)
downloadpdfium-90a7c2280f80b3728a3a051b6848678803aaf49e.tar.xz
Merge to XFA: patch from CL 703213004
Fix bug with reading from uninitialized variable found by VC++'s /analyze. The flag variable is conditionally initialized but unconditionally read. Warning was: src\fpdfapi\fpdf_page\fpdf_page_pattern.cpp(274) : warning C6001: Using uninitialized memory 'flag'. BUG=427616 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/703213004 Review URL: https://codereview.chromium.org/680173005
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index 467ef9b3f6..4644302c5b 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -266,7 +266,7 @@ CFX_FloatRect _GetShadingBBox(CPDF_Stream* pStream, int type, const CFX_AffineMa
int full_point_count = type == 7 ? 16 : (type == 6 ? 12 : 1);
int full_color_count = (type == 6 || type == 7) ? 4 : 1;
while (!stream.m_BitStream.IsEOF()) {
- FX_DWORD flag;
+ FX_DWORD flag = 0;
if (type != 5) {
flag = stream.GetFlag();
}