[packages/fuse-iso] fix infinite loop in getopt processing; rel 3

atler atler at pld-linux.org
Mon Apr 12 18:08:16 CEST 2021


commit f768223eb2187b9b55a49890e8f91a9d0c4b07ed
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Apr 12 18:04:30 2021 +0200

    fix infinite loop in getopt processing; rel 3
    
    c lang spec does not specify signedness of char -- it could be either
    signed or unsigned depending on the machine. since code relies on signed
    char make it explicit, otherwise loop never ends on machines with
    unsigned char (which happens to be aarch64 with gcc 10)

 fuse-iso-getopt_loop.patch | 11 +++++++++++
 fuse-iso.spec              |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/fuse-iso.spec b/fuse-iso.spec
index c023b58..5fc1e64 100644
--- a/fuse-iso.spec
+++ b/fuse-iso.spec
@@ -2,12 +2,13 @@ Summary:	FUSE module to mount ISO filesystem images
 Summary(pl.UTF-8):	Moduł FUSE pozwalający montować obrazy ISO
 Name:		fuse-iso
 Version:	20070708
-Release:	2
+Release:	3
 License:	GPL
 Group:		Applications/System
 Source0:	http://ubiz.ru/dm/fuseiso-%{version}.tar.bz2
 # Source0-md5:	4bb50412b6d01f337565e28afddca3a5
 Patch0:		%{name}.patch
+Patch1:		%{name}-getopt_loop.patch
 URL:		http://fuse.sourceforge.net/wiki/index.php/FuseIso
 BuildRequires:	automake
 BuildRequires:	glib2-devel >= 1:2.2
@@ -24,6 +25,7 @@ Moduł FUSE pozwalający montować obrazy ISO.
 %prep
 %setup -q -n fuseiso-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 cp -f /usr/share/automake/config.sub .
diff --git a/fuse-iso-getopt_loop.patch b/fuse-iso-getopt_loop.patch
new file mode 100644
index 0000000..b9d7778
--- /dev/null
+++ b/fuse-iso-getopt_loop.patch
@@ -0,0 +1,11 @@
+--- fuseiso-20070708/src/fuseiso.c.orig	2021-04-12 18:00:05.513973615 +0200
++++ fuseiso-20070708/src/fuseiso.c	2021-04-12 18:00:48.777114350 +0200
+@@ -309,7 +309,7 @@
+     maintain_mtab = 1;
+     iocharset = NULL;
+     
+-    char c;
++    signed char c;
+     while((c = getopt(argc, argv, "+npc:h")) > 0) {
+         switch(c) {
+             case 'n':
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fuse-iso.git/commitdiff/f768223eb2187b9b55a49890e8f91a9d0c4b07ed



More information about the pld-cvs-commit mailing list