diff --git a/src/dbus/applicationservice.cpp b/src/dbus/applicationservice.cpp index 381e26f..9cc2107 100644 --- a/src/dbus/applicationservice.cpp +++ b/src/dbus/applicationservice.cpp @@ -944,6 +944,10 @@ LaunchTask ApplicationService::unescapeExec(const QString &str, const QStringLis auto filesCode = list.first().back().toLatin1(); auto codeStr = QString(R"(%%1)").arg(filesCode); auto location = execList.indexOf(codeStr); + if (location == -1) { + qWarning() << "invalid exec format, all filed code will be ignored."; + return {}; + } switch (filesCode) { case 'f': { // Defer to async job