[SCM] baloo packaging branch, master, updated. debian/5.14.0-1-1-g0572481

Felix Geyer fgeyer at moszumanska.debian.org
Fri Oct 2 21:55:45 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/baloo.git;a=commitdiff;h=0572481

The following commit has been merged in the master branch:
commit 0572481b3ae85839e21970f55452cd531905781e
Author: Felix Geyer <felix at callisto.lan>
Date:   Fri Oct 2 23:55:37 2015 +0200

    Cherry-pick upstream commits to fix crashes. (Closes: #800061)
    
    * Cherry-pick upstream commits to fix crashes. (Closes: #800061)
      - Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff
      - Fail_Baloo_File_load_if_the_Database_is_not_open.diff
---
 debian/changelog                                   |  8 +++
 ...in_various_bits_so_that_Baloo_doesnt_crash.diff | 58 ++++++++++++++++++++++
 ...aloo_File_load_if_the_Database_is_not_open.diff | 30 +++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 98 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c15c14a..e19bc6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+baloo-kf5 (5.14.0-2) unstable; urgency=medium
+
+  * Cherry-pick upstream commits to fix crashes. (Closes: #800061)
+    - Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff
+    - Fail_Baloo_File_load_if_the_Database_is_not_open.diff
+
+ -- Felix Geyer <fgeyer at debian.org>  Fri, 02 Oct 2015 23:50:56 +0200
+
 baloo-kf5 (5.14.0-1) unstable; urgency=medium
 
   * New upstream release (5.14.0).
diff --git a/debian/patches/Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff b/debian/patches/Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff
new file mode 100644
index 0000000..07f0445
--- /dev/null
+++ b/debian/patches/Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff
@@ -0,0 +1,58 @@
+From 3312d6f3f4b80ec04e86c2ea103adc51ade0f020 Mon Sep 17 00:00:00 2001
+From: Rohan Garg <rohan at garg.io>
+Date: Wed, 16 Sep 2015 01:20:47 +0200
+Subject: [PATCH] Add error checking in various bits so that Baloo doesn't
+ crash when disabled.
+
+REVIEW: 125241
+BUG: 352454
+---
+ src/engine/database.cpp | 16 +++++++++++++---
+ src/lib/searchstore.cpp |  2 +-
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+Index: b/src/engine/database.cpp
+===================================================================
+--- a/src/engine/database.cpp
++++ b/src/engine/database.cpp
+@@ -72,14 +72,24 @@ bool Database::open(OpenMode mode)
+         return false;
+     }
+ 
+-    mdb_env_create(&m_env);
++    int rc = mdb_env_create(&m_env);
++    if (rc) {
++        m_env = 0;
++        return false;
++    }
++
+     mdb_env_set_maxdbs(m_env, 12);
+     mdb_env_set_mapsize(m_env, static_cast<size_t>(1024) * 1024 * 1024 * 5); // 5 gb
+ 
+     // The directory needs to be created before opening the environment
+     QByteArray arr = QFile::encodeName(m_path) + "/index";
+-    mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT, 0664);
+-    int rc = mdb_reader_check(m_env, 0);
++    rc = mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT, 0664);
++    if (rc) {
++        m_env = 0;
++        return false;
++    }
++
++    rc = mdb_reader_check(m_env, 0);
+     Q_ASSERT_X(rc == 0, "Database::open reader_check", mdb_strerror(rc));
+ 
+     //
+Index: b/src/lib/searchstore.cpp
+===================================================================
+--- a/src/lib/searchstore.cpp
++++ b/src/lib/searchstore.cpp
+@@ -66,7 +66,7 @@ SearchStore::~SearchStore()
+ 
+ QStringList SearchStore::exec(const Term& term, int limit, bool sortResults)
+ {
+-    if (!m_db) {
++    if (!m_db || !m_db->isOpen()) {
+         return QStringList();
+     }
+ 
diff --git a/debian/patches/Fail_Baloo_File_load_if_the_Database_is_not_open.diff b/debian/patches/Fail_Baloo_File_load_if_the_Database_is_not_open.diff
new file mode 100644
index 0000000..d0e5957
--- /dev/null
+++ b/debian/patches/Fail_Baloo_File_load_if_the_Database_is_not_open.diff
@@ -0,0 +1,30 @@
+From 29fe68f2657df503926e629477a41f7d9435048f Mon Sep 17 00:00:00 2001
+From: Boudhayan Gupta <me at BaloneyGeek.com>
+Date: Wed, 23 Sep 2015 00:25:36 +0530
+Subject: [PATCH] Fail Baloo::File::load() if the Database is not open. Fixes
+ crash if selecting multiple files in Dolphin with Baloo disabled.
+
+BUG: 353049
+REVIEW: 125352
+---
+ src/lib/file.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/lib/file.cpp b/src/lib/file.cpp
+index 6bff57d..ac034eb 100644
+--- a/src/lib/file.cpp
++++ b/src/lib/file.cpp
+@@ -98,6 +98,10 @@ bool File::load()
+     Database *db = globalDatabaseInstance();
+     db->open(Database::OpenDatabase);
+ 
++    if (!db->isOpen()) {
++        return false;
++    }
++
+     quint64 id = filePathToId(QFile::encodeName(d->url));
+     if (!id) {
+         return false;
+-- 
+2.5.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 4168e54..1ba7f8c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 disable_failing_test
+Add_error_checking_in_various_bits_so_that_Baloo_doesnt_crash.diff
+Fail_Baloo_File_load_if_the_Database_is_not_open.diff

-- 
baloo packaging



More information about the pkg-kde-commits mailing list