From 475c7c87bb26ae9f2c9d961267e2ae647eb0f881 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 19 Sep 2017 11:22:12 +0200 Subject: [PATCH] Backport a fix for a crash when processing virtual elements https://bugzilla.redhat.com/show_bug.cgi?id=1488707 --- ...r-extract-Skip-over-virtual-elements.patch | 33 +++++++++++++++++++ tracker-miners.spec | 8 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0001-tracker-extract-Skip-over-virtual-elements.patch diff --git a/0001-tracker-extract-Skip-over-virtual-elements.patch b/0001-tracker-extract-Skip-over-virtual-elements.patch new file mode 100644 index 0000000..58f3160 --- /dev/null +++ b/0001-tracker-extract-Skip-over-virtual-elements.patch @@ -0,0 +1,33 @@ +From a0da953c8637bef4ddb963e0d459dfa37b5a643a Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Tue, 12 Sep 2017 15:13:46 +0200 +Subject: [PATCH] tracker-extract: Skip over virtual elements + +It is possible to fool tracker-extract into processing virtual elements +that aren't backed up by files. Those can be safely ignored instead. + +https://bugzilla.gnome.org/show_bug.cgi?id=785853 +--- + src/tracker-extract/tracker-extract-decorator.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c +index cfb51d797..6e251f436 100644 +--- a/src/tracker-extract/tracker-extract-decorator.c ++++ b/src/tracker-extract/tracker-extract-decorator.c +@@ -264,6 +264,12 @@ decorator_next_item_cb (TrackerDecorator *decorator, + + g_clear_error (&error); + return; ++ } else if (!tracker_decorator_info_get_url (info)) { ++ /* Skip virtual elements with no real file representation */ ++ priv->n_extracting_files--; ++ tracker_decorator_info_unref (info); ++ decorator_get_next_file (decorator); ++ return; + } + + data = g_new0 (ExtractData, 1); +-- +2.14.1 + diff --git a/tracker-miners.spec b/tracker-miners.spec index 3590530..da5d38c 100644 --- a/tracker-miners.spec +++ b/tracker-miners.spec @@ -14,9 +14,12 @@ Name: tracker-miners Version: 2.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tracker miners and metadata extractors +# Backported from upstream +Patch0: 0001-tracker-extract-Skip-over-virtual-elements.patch + # libtracker-extract is LGPLv2+; the miners are a mix of GPLv2+ and LGPLv2+ code License: GPLv2+ and LGPLv2+ URL: https://wiki.gnome.org/Projects/Tracker @@ -126,6 +129,9 @@ rm -f %{buildroot}%{_libdir}/tracker-miners-2.0/*.so %changelog +* Tue Sep 19 2017 Kalev Lember - 2.0.0-3 +- Backport a fix for a crash when processing virtual elements (#1488707) + * Fri Sep 15 2017 Kalev Lember - 2.0.0-2 - Package review fixes (#1491725): - Pass --disable-mp3 to use the generic gstreamer extractor