From 19cd8c5012db6e1de7ffaee5b217a5fb3cdb1f67ae82137421ac716f58ac95b1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Fri, 12 Oct 2018 09:16:50 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kio-extras5?expand=0&rev=87 --- kio-extras5.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/kio-extras5.spec b/kio-extras5.spec index ab2fe1d..397be2d 100644 --- a/kio-extras5.spec +++ b/kio-extras5.spec @@ -104,6 +104,7 @@ This is the development package for libkioarchive %prep %setup -q -n kio-extras-%{version} %autopatch -p1 + sed -i '/^add_subdirectory( doc )/d' CMakeLists.txt %build From adb4775c3669c84125dd5432af62477ffd2e5d84926af45a8f8fe171d843e631 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 17 Oct 2018 12:00:35 +0000 Subject: [PATCH 2/2] - Add upstream patch 0001-Avoid-crash-by-not-checking-free-space-for-smb.patch * Prevents crashes when browsing smb:// OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kio-extras5?expand=0&rev=88 --- ...h-by-not-checking-free-space-for-smb.patch | 37 +++++++++++++++++++ kio-extras5.changes | 6 +++ kio-extras5.spec | 2 + 3 files changed, 45 insertions(+) create mode 100644 0001-Avoid-crash-by-not-checking-free-space-for-smb.patch diff --git a/0001-Avoid-crash-by-not-checking-free-space-for-smb.patch b/0001-Avoid-crash-by-not-checking-free-space-for-smb.patch new file mode 100644 index 0000000..5290063 --- /dev/null +++ b/0001-Avoid-crash-by-not-checking-free-space-for-smb.patch @@ -0,0 +1,37 @@ +From 767415da97a7fae3c5578b9a4fb17a7be041d8ae Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Fri, 31 Aug 2018 09:17:17 +0200 +Subject: [PATCH] Avoid crash by not checking free space for smb:// + +This isn't a real location but the overview of all found hosts. +smbc_opendir would succeed but then crash in smbc_fstatvfs + +Differential Revision: https://phabricator.kde.org/D15142 + +(cherry picked from commit 000b1d910b71b491621c7cdbd934c277171c20bf) +--- + smb/kio_smb_browse.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/smb/kio_smb_browse.cpp b/smb/kio_smb_browse.cpp +index 47b2b328..1fa0e6fb 100644 +--- a/smb/kio_smb_browse.cpp ++++ b/smb/kio_smb_browse.cpp +@@ -492,6 +492,14 @@ void SMBSlave::fileSystemFreeSpace(const QUrl& url) + { + qCDebug(KIO_SMB) << url; + ++ // Avoid crashing in smbc_fstatvfs below when ++ // requesting free space for smb:// which doesn't ++ // make sense to do to begin with ++ if (url.host().isEmpty()) { ++ error(KIO::ERR_COULD_NOT_STAT, url.url()); ++ return; ++ } ++ + SMBUrl smbcUrl = url; + int handle = smbc_opendir(smbcUrl.toSmbcUrl()); + if (handle < 0) { +-- +2.19.1 + diff --git a/kio-extras5.changes b/kio-extras5.changes index c318a02..c3c1160 100644 --- a/kio-extras5.changes +++ b/kio-extras5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 17 11:58:56 UTC 2018 - Luca Beltrame + +- Add upstream patch 0001-Avoid-crash-by-not-checking-free-space-for-smb.patch + * Prevents crashes when browsing smb:// + ------------------------------------------------------------------- Thu Oct 11 20:06:53 UTC 2018 - lbeltrame@kde.org diff --git a/kio-extras5.spec b/kio-extras5.spec index 397be2d..409aba6 100644 --- a/kio-extras5.spec +++ b/kio-extras5.spec @@ -33,6 +33,8 @@ Source99: %{name}-rpmlintrc Patch0: fix-mtp-paste-with-KF5-5.25.diff # PATCH-FEATURE-UPSTREAM Patch1: 0001-sftp-bump-pending-request-count-from-1-to-128.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-Avoid-crash-by-not-checking-free-space-for-smb.patch BuildRequires: OpenEXR-devel BuildRequires: flac-devel BuildRequires: gperf