From 55bf90ff787f4e84947a5df833f66082e54016df Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Tue, 29 Dec 2015 00:51:16 -0500 Subject: 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 --- src/kconf_update/kconfigutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kconf_update/kconfigutils.cpp') 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(); } -- cgit v1.2.1