summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-frameworks/kio/files/kio-5.110.0-crash.patch')
-rw-r--r--kde-frameworks/kio/files/kio-5.110.0-crash.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.110.0-crash.patch b/kde-frameworks/kio/files/kio-5.110.0-crash.patch
new file mode 100644
index 000000000000..dcda1cfe06f5
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.110.0-crash.patch
@@ -0,0 +1,28 @@
+From 48322f44323a1fc09305d66d9093fe6c3780709e Mon Sep 17 00:00:00 2001
+From: Kevin Ottens <kevin.ottens@enioka.com>
+Date: Fri, 15 Sep 2023 09:45:58 +0200
+Subject: [PATCH] Don't crash if KMountPoint gives nothing back while checking
+ for CIFS
+
+BUG: 474451
+---
+ src/ioslaves/file/file_unix.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
+index 87c47e7e74..c0bc64354d 100644
+--- a/src/ioslaves/file/file_unix.cpp
++++ b/src/ioslaves/file/file_unix.cpp
+@@ -328,6 +328,9 @@ inline static time_t stat_mtime(const QT_STATBUF &buf)
+ static bool isOnCifsMount(const QString &filePath)
+ {
+ const auto mount = KMountPoint::currentMountPoints().findByPath(filePath);
++ if (!mount) {
++ return false;
++ }
+ return mount->mountType() == QStringLiteral("cifs") || mount->mountType() == QStringLiteral("smb3");
+ }
+
+--
+GitLab
+