aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dawson <matthew@mjdsystems.ca>2015-12-29 22:47:43 -0500
committerMatthew Dawson <matthew@mjdsystems.ca>2015-12-29 22:48:00 -0500
commit2ebffd8e220b0f92a0a288a717d122018767a6b4 (patch)
tree4a5148ab2cfd6227be7f2083b48a69b2a29394b3
parentdf3440f328405623de927595b4555e06600d5626 (diff)
downloadkconfig-2ebffd8e220b0f92a0a288a717d122018767a6b4.tar.gz
kconfig-2ebffd8e220b0f92a0a288a717d122018767a6b4.tar.bz2
Ensure KonfUpdate's fields are all initialized.
These fields should all be written to before they are read during normal operation, but this ensures they have a sensible default in case they are not. Coverity issue 1291513.
-rw-r--r--src/kconf_update/kconf_update.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp
index 5108fb2e..2acd720d 100644
--- a/src/kconf_update/kconf_update.cpp
+++ b/src/kconf_update/kconf_update.cpp
@@ -106,7 +106,8 @@ protected:
KonfUpdate::KonfUpdate(QCommandLineParser *parser)
: m_oldConfig1(Q_NULLPTR), m_oldConfig2(Q_NULLPTR), m_newConfig(Q_NULLPTR),
- m_textStream(Q_NULLPTR), m_file(Q_NULLPTR)
+ m_bCopy(false), m_bOverwrite(false), m_textStream(Q_NULLPTR),
+ m_file(Q_NULLPTR), m_lineCount(-1)
{
bool updateAll = false;