aboutsummaryrefslogtreecommitdiff
path: root/src/kconf_update/kconfigutils.cpp
diff options
context:
space:
mode:
authorMatthew Dawson <matthew@mjdsystems.ca>2015-12-29 00:51:16 -0500
committerMatthew Dawson <matthew@mjdsystems.ca>2015-12-29 19:34:38 -0500
commit55bf90ff787f4e84947a5df833f66082e54016df (patch)
tree8d3705c05e0dc09b4d3c4c1801afd1998378f13d /src/kconf_update/kconfigutils.cpp
parent837edaabc446b946fca5f318ae53ad305eab13fd (diff)
downloadkconfig-55bf90ff787f4e84947a5df833f66082e54016df.tar.gz
kconfig-55bf90ff787f4e84947a5df833f66082e54016df.tar.bz2
Ensure group is unescaped properly in kconf_update.
During a kconf_update run, an invalid group name may be treated as correct even though the name failed to unescape. This leads the group name to be a null character, which will fail. If the unescape failed, return that failure status instead. This should have no impact, as the previous result would have been wrong anyways. Now a more useful diagnostic will be returned instead. Update the unit tests to ensure this issue is tested in the future. Found in Coverity issue 258087. REVIEW: 126556
Diffstat (limited to 'src/kconf_update/kconfigutils.cpp')
-rw-r--r--src/kconf_update/kconfigutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kconf_update/kconfigutils.cpp b/src/kconf_update/kconfigutils.cpp
index 02b3f0a9..0a2741ea 100644
--- a/src/kconf_update/kconfigutils.cpp
+++ b/src/kconf_update/kconfigutils.cpp
@@ -46,7 +46,7 @@ KConfigGroup openGroup(KConfig *config, const QStringList &lst)
QStringList parseGroupString(const QString &_str, bool *ok, QString *error)
{
QString str = unescapeString(_str.trimmed(), ok, error);
- if (!ok) {
+ if (!*ok) {
return QStringList();
}