From dc6f6b3c124db9ed27b83f543e579059d4a46e34 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: May 25 2008 19:22:42 +0000 Subject: - Escape filename in zip file properly --- diff --git a/cbrpager-0.9.17-zip-filen-escape.patch b/cbrpager-0.9.17-zip-filen-escape.patch new file mode 100644 index 0000000..b191114 --- /dev/null +++ b/cbrpager-0.9.17-zip-filen-escape.patch @@ -0,0 +1,23 @@ +--- cbrpager-0.9.17/src/global.c.debug 2008-05-24 05:46:57.000000000 +0900 ++++ cbrpager-0.9.17/src/global.c 2008-05-26 04:11:08.000000000 +0900 +@@ -324,7 +324,7 @@ + esc[idx] = '\0'; + + printf(_("Requesting page %d/%d (%s)\n"), nr+1, +- g_list_length(pagelist), esc); ++ g_list_length(pagelist), p); + + /* The following patch was received from Mamoru Tasaka, 2008/05/22 + to solve potential security problems with the system() call */ +@@ -354,9 +354,10 @@ + pref.lastbook, p, (char *)NULL); + return; /* should not reach here */ + case ZIP_FILE: ++ /* for zip file, esc must be passed instead of p */ + execlp("unzip", + "unzip", "-p", "-C", +- pref.lastbook, p, (char *)NULL); ++ pref.lastbook, esc, (char *)NULL); + return; /* should not reach here */ + } + return; /* should not reach here */ diff --git a/cbrpager.spec b/cbrpager.spec index b6f32b4..67217a9 100644 --- a/cbrpager.spec +++ b/cbrpager.spec @@ -1,12 +1,13 @@ Name: cbrpager Version: 0.9.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple comic book pager for Linux Group: Amusements/Graphics License: GPLv2+ URL: http://www.jcoppens.com/soft/cbrpager/index.en.php Source0: http://downloads.sourceforge.net/cbrpager/%{name}-%{version}.tar.gz +Patch0: cbrpager-0.9.17-zip-filen-escape.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libgnomeui-devel @@ -22,6 +23,7 @@ gif and png images, and you can zoom in and out. %prep %setup -q +%patch0 -p1 -b .zip_esc for f in \ ChangeLog \ @@ -78,6 +80,9 @@ desktop-file-install \ %changelog +* Mon May 26 2008 Mamoru Tasaka - 0.9.17-2 +- Escape filename in zip file properly + * Sat May 24 2008 Mamoru Tasaka - 0.9.17-1 - 0.9.17 - 2 patches dropped, upstream applied