core: fix a few uninitialized members
Found by Coverity when scanning the bundled pdfium-3004 in LibreOffice.
This fixes:
- CID 1400341: Uninitialized members (UNINIT_CTOR)
CFX_ImageRenderer::m_pIccTransform
- CID 1400340: Uninitialized members (UNINIT_CTOR)
CPDF_CharPosList::m_nChars
- CID 1400339: Uninitialized members (UNINIT_CTOR)
CPDF_StreamContentParser::m_PathStartX/Y
- CID 1400337: Uninitialized members (UNINIT_CTOR)
CFX_ScanlineCompositor::m_pIccTransform
Change-Id: Iab3862eb77be8bf379093a47f6c60ce987099982
Reviewed-on: https://pdfium-review.googlesource.com/2630
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 93478de..21b1377 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -265,6 +265,8 @@
m_pPathPoints(nullptr),
m_PathPointCount(0),
m_PathAllocSize(0),
+ m_PathStartX(0.0f),
+ m_PathStartY(0.0f),
m_PathCurrentX(0.0f),
m_PathCurrentY(0.0f),
m_PathClipType(0),
diff --git a/core/fpdfapi/render/cpdf_charposlist.cpp b/core/fpdfapi/render/cpdf_charposlist.cpp
index 4857b93..05f441c 100644
--- a/core/fpdfapi/render/cpdf_charposlist.cpp
+++ b/core/fpdfapi/render/cpdf_charposlist.cpp
@@ -11,6 +11,7 @@
CPDF_CharPosList::CPDF_CharPosList() {
m_pCharPos = nullptr;
+ m_nChars = 0;
}
CPDF_CharPosList::~CPDF_CharPosList() {
diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp
index e3dc740..072ebbd 100644
--- a/core/fxge/dib/fx_dib_composite.cpp
+++ b/core/fxge/dib/fx_dib_composite.cpp
@@ -4014,6 +4014,7 @@
m_CacheSize = 0;
m_bRgbByteOrder = false;
m_BlendType = FXDIB_BLEND_NORMAL;
+ m_pIccTransform = nullptr;
}
CFX_ScanlineCompositor::~CFX_ScanlineCompositor() {
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp
index 8e6366d..96cae9d 100644
--- a/core/fxge/dib/fx_dib_main.cpp
+++ b/core/fxge/dib/fx_dib_main.cpp
@@ -1471,6 +1471,7 @@
CFX_ImageRenderer::CFX_ImageRenderer() {
m_Status = 0;
+ m_pIccTransform = nullptr;
m_bRgbByteOrder = false;
m_BlendType = FXDIB_BLEND_NORMAL;
}