From 565fa66f7ec31eac15927d4c0ce2a40b87b3887c Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 30 Aug 2020 23:46:38 +0200 Subject: kconf_update: test the return value of QTemporaryFile::open() for good measure --- src/kconf_update/kconf_update.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/kconf_update/kconf_update.cpp') diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp index 1571ea27..02317a25 100644 --- a/src/kconf_update/kconf_update.cpp +++ b/src/kconf_update/kconf_update.cpp @@ -783,9 +783,11 @@ void KonfUpdate::gotScript(const QString &_script) } QTemporaryFile scriptIn; - scriptIn.open(); QTemporaryFile scriptOut; - scriptOut.open(); + if (!scriptIn.open() || !scriptOut.open()) { + qCDebugFile(KCONF_UPDATE_LOG) << "Could not create temporary file!"; + return; + } int result; QProcess proc; -- cgit v1.2.1