Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp

Issue 366803003: Fix uninitialized RGB in GetRGB (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index ff44c591c73322e22edb1b8a89cbb1b0040862a8..3dad6be12936a2b468e3dbd277e3ade343f10b9b 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -1362,7 +1362,7 @@ FX_BOOL CPDF_Color::GetRGB(int& R, int& G, int& B) const
if (m_pCS == NULL || m_pBuffer == NULL) {
return FALSE;
}
- FX_FLOAT r, g, b;
+ FX_FLOAT r=0.0f, g=0.0f, b=0.0f;
if (!m_pCS->GetRGB(m_pBuffer, r, g, b)) {
return FALSE;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698