Backport a fix for a crash when processing virtual elements

https://bugzilla.redhat.com/show_bug.cgi?id=1488707
This commit is contained in:
Kalev Lember 2017-09-19 11:22:12 +02:00
parent 7110137e91
commit 475c7c87bb
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From a0da953c8637bef4ddb963e0d459dfa37b5a643a Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
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

View File

@ -14,9 +14,12 @@
Name: tracker-miners Name: tracker-miners
Version: 2.0.0 Version: 2.0.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: Tracker miners and metadata extractors 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 # libtracker-extract is LGPLv2+; the miners are a mix of GPLv2+ and LGPLv2+ code
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: https://wiki.gnome.org/Projects/Tracker URL: https://wiki.gnome.org/Projects/Tracker
@ -126,6 +129,9 @@ rm -f %{buildroot}%{_libdir}/tracker-miners-2.0/*.so
%changelog %changelog
* Tue Sep 19 2017 Kalev Lember <klember@redhat.com> - 2.0.0-3
- Backport a fix for a crash when processing virtual elements (#1488707)
* Fri Sep 15 2017 Kalev Lember <klember@redhat.com> - 2.0.0-2 * Fri Sep 15 2017 Kalev Lember <klember@redhat.com> - 2.0.0-2
- Package review fixes (#1491725): - Package review fixes (#1491725):
- Pass --disable-mp3 to use the generic gstreamer extractor - Pass --disable-mp3 to use the generic gstreamer extractor