diff --git a/0001-Don-t-crash-if-KMountPoint-gives-nothing-back-while-.patch b/0001-Don-t-crash-if-KMountPoint-gives-nothing-back-while-.patch new file mode 100644 index 0000000..5c161e4 --- /dev/null +++ b/0001-Don-t-crash-if-KMountPoint-gives-nothing-back-while-.patch @@ -0,0 +1,28 @@ +From 48322f44323a1fc09305d66d9093fe6c3780709e Mon Sep 17 00:00:00 2001 +From: Kevin Ottens +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 87c47e7e7..c0bc64354 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"); + } + +-- +2.42.0 + diff --git a/kio.changes b/kio.changes index 9ee94b4..0e9a140 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 18 18:44:06 UTC 2023 - Christophe Marin + +- Add upstream crash fix (kde#474451) + * 0001-Don-t-crash-if-KMountPoint-gives-nothing-back-while-.patch + ------------------------------------------------------------------- Wed Sep 6 12:24:05 UTC 2023 - Christophe Marin diff --git a/kio.spec b/kio.spec index ef230d0..06b31cf 100644 --- a/kio.spec +++ b/kio.spec @@ -35,6 +35,8 @@ Source2: frameworks.keyring %endif # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 Patch0: kio_help-fallback-to-kde4-docs.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Don-t-crash-if-KMountPoint-gives-nothing-back-while-.patch BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes # gcc7 is too old for std::transform_reduce