fix the segmentation fault due to missing XDG Directories
This commit is contained in:
parent
0164020e97
commit
4cddf8b9ee
@ -0,0 +1,42 @@
|
||||
From 8f62dfcdd39f8c2d208a2fd902cc09057638cbb7 Mon Sep 17 00:00:00 2001
|
||||
From: nitinosiris <nitinwartkar58@gmail.com>
|
||||
Date: Fri, 4 Jun 2021 17:45:18 +0530
|
||||
Subject: [PATCH] cli: XDG Directories
|
||||
|
||||
If any environment doesn't have xdg directories set up
|
||||
then it resulted in a SEG-fault. Adding a proper check solved it.
|
||||
|
||||
Fixes: #172
|
||||
---
|
||||
src/tracker/tracker-index.c | 15 ++++++++++-----
|
||||
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/tracker/tracker-index.c b/src/tracker/tracker-index.c
|
||||
index 89ed32671a..7902f48dd7 100644
|
||||
--- a/src/tracker/tracker-index.c
|
||||
+++ b/src/tracker/tracker-index.c
|
||||
@@ -324,11 +324,16 @@ print_list (GStrv list,
|
||||
else
|
||||
continue;
|
||||
|
||||
- str = tracker_term_ellipsize (path, len, TRACKER_ELLIPSIZE_START);
|
||||
- g_print ("%-*s " BOLD_BEGIN "%s" BOLD_END "\n",
|
||||
- len, str,
|
||||
- recursive ? "*" : "-");
|
||||
- g_free (str);
|
||||
+ if (path) {
|
||||
+ str = tracker_term_ellipsize (path, len, TRACKER_ELLIPSIZE_START);
|
||||
+ g_print ("%-*s " BOLD_BEGIN "%s" BOLD_END "\n",
|
||||
+ len, str,
|
||||
+ recursive ? "*" : "-");
|
||||
+ g_free (str);
|
||||
+ }
|
||||
+ else {
|
||||
+ g_print("Could not expand XDG user directory %s", list[i]);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: tracker3-miners
|
||||
Version: 3.0.5
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: One of two parts of tracker mainly contains the indexer daemon and tools.
|
||||
|
||||
License: GPLv2+ and LGPLv2+
|
||||
@ -12,6 +12,7 @@ Source1: tracker3-miners.conf
|
||||
Patch1: tracker-miners-3.0.5-sw.patch
|
||||
Patch2: CVE-2023-5557.patch
|
||||
Patch3: libtracker-miners-common-Add-more-seccomp-rules.patch
|
||||
Patch4: cli-fix-the-segmentation-fault-due-to-missing-XDG-Directories.patch
|
||||
|
||||
BuildRequires: asciidoc libxslt coreutils glib2 glib2-devel gcc giflib-devel meson systemd
|
||||
BuildRequires: pkgconfig(tracker-sparql-3.0) pkgconfig(tracker-testutils-3.0)
|
||||
@ -92,6 +93,12 @@ sed -i 's/lib64/lib/g' %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 03 2025 wangshuo <wangshuo@kylinos.cn> - 3.0.5-7
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix the segmentation fault due to missing XDG Directories
|
||||
|
||||
* Mon Jan 13 2025 wangshuo <wangshuo@kylinos.cn> - 3.0.5-6
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user