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 --- autotests/test_kconfigutils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'autotests/test_kconfigutils.cpp') diff --git a/autotests/test_kconfigutils.cpp b/autotests/test_kconfigutils.cpp index 0946cf8a..576ef784 100644 --- a/autotests/test_kconfigutils.cpp +++ b/autotests/test_kconfigutils.cpp @@ -57,6 +57,12 @@ void TestKConfigUtils::testParseGroupString_data() << QStringList() << false ; + + QTest::newRow("invalid-escape-string") + << "[a\\z]" + << QStringList() + << false + ; } void TestKConfigUtils::testParseGroupString() -- cgit v1.2.1