pull in upstream performance improvement (fdo#88524)

This commit is contained in:
Rex Dieter 2015-01-19 05:41:03 -06:00
parent 76fc848410
commit f9ce222fb8
3 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 46e8421a238640d0a18d3fe856466c1d22aeadbf Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Sat, 17 Jan 2015 01:15:19 -0700
Subject: [PATCH 6/7] xdg-open: Improve performance of get_key function
---
scripts/xdg-open.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index b6045f8..ee2889e 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -57,11 +57,11 @@ get_key()
"["*)
desktop_entry=""
;;
- *)
+ "${key}="*)
# Only match Desktop Entry group
if [ -n "${desktop_entry}" ]
then
- echo "${line}" | grep -E "^${key}=" | cut -d= -f 2-
+ echo "${line}" | cut -d= -f 2-
fi
esac
done < "${file}"
--
2.1.0

View File

@ -0,0 +1,24 @@
From e8ee3b18d16e41b95148111b920a0c8beed3ac6c Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Mon, 19 Jan 2015 05:37:34 -0600
Subject: [PATCH 7/7] Add changelog for prior commit
---
ChangeLog | 1 +
1 file changed, 1 insertion(+)
diff --git a/ChangeLog b/ChangeLog
index 627df21..9a01f82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
2015-01-19 Rex Dieter <rdieter@fedoraproject.org>
* xdg-open: better fix for command injection vulnerability (BR66670)
+ * xdg-open is extremely slow because get_key executes grep unnecessarily (BR88524)
2015-01-15 Reuben Thomas <rrt@sc3d.org>
* xdg-mime: dereference symlinks when using mimetype or file (BR39923)
--
2.1.0

View File

@ -4,7 +4,7 @@
Summary: Basic desktop integration functions
Name: xdg-utils
Version: 1.1.0
Release: 0.35.%{pre}%{?dist}
Release: 0.36.%{pre}%{?dist}
URL: http://portland.freedesktop.org/
%if 0%{?pre:1}
@ -21,6 +21,8 @@ Patch2: 0002-xdg-open-command-injection-vulnerability-BR66670.patch
Patch3: 0003-xdg-mime-dereference-symlinks-when-using-mimetype-or.patch
Patch4: 0004-xdg-screensaver-Change-screensaver_freedesktop-s-int.patch
Patch5: 0005-xdg-open-better-fix-for-command-injection-vulnerabil.patch
Patch6: 0006-xdg-open-Improve-performance-of-get_key-function.patch
Patch7: 0007-Add-changelog-for-prior-commit.patch
# make sure BuildArch comes *after* patches, to ensure %%autosetup works right
# http://bugzilla.redhat.com/1084309
@ -95,6 +97,9 @@ make install DESTDIR=%{buildroot}
%changelog
* Mon Jan 19 2015 Rex Dieter <rdieter@fedoraproject.org> 1.1.0-0.36.rc3
- pull in upstream performance improvement (fdo#88524)
* Mon Jan 19 2015 Rex Dieter <rdieter@fedoraproject.org> 1.1.0-0.35.rc3
- pull in latest commits, notably more fdo screensaver fixes