[packages/uae] - fix format string errors - fix xf86vmode extension usage (patch from OpenBSD-wip) - rel 2

baggins baggins at pld-linux.org
Wed Jan 22 19:50:25 CET 2014


commit d1fadf152cb9db25bdd0e5047a13b41a7ab15c78
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Jan 22 19:49:21 2014 +0100

    - fix format string errors
    - fix xf86vmode extension usage (patch from OpenBSD-wip)
    - rel 2

 format-security.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
 uae.spec              |  6 +++++-
 xvidmode.patch        | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+), 1 deletion(-)
---
diff --git a/uae.spec b/uae.spec
index c46ec55..71c4d9d 100644
--- a/uae.spec
+++ b/uae.spec
@@ -2,7 +2,7 @@ Summary:	Unix Amiga Emulator
 Summary(pl.UTF-8):	Uniksowy Emulator Amigi
 Name:		uae
 Version:	0.8.29
-Release:	1
+Release:	2
 License:	GPL
 Group:		Applications/Emulators
 Source0:	http://www.amigaemulator.org/files/sources/develop/%{name}-%{version}.tar.bz2
@@ -14,6 +14,8 @@ Patch1:		%{name}-allow_spaces_in_zip_filenames.patch
 Patch2:		%{name}-preserve_home_in_writing_optionsfile.patch
 Patch3:		%{name}-struct_uae_wrong_fields_name.patch
 Patch4:		%{name}-uae_reset_args.patch
+Patch5:		format-security.patch
+Patch6:		xvidmode.patch
 URL:		http://www.amigaemulator.org/
 BuildRequires:	alsa-lib-devel
 BuildRequires:	autoconf
@@ -48,6 +50,8 @@ ale powinien się kompilować na większości platformach uniksowych.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p0
 sed -e 's/build68kc/build68k/' -i src/Makefile.in
 
 %build
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..9f15370
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,42 @@
+--- uae-0.8.29/src/cfgfile.c~	2008-11-30 02:18:27.000000000 +0100
++++ uae-0.8.29/src/cfgfile.c	2014-01-22 19:39:52.109043770 +0100
+@@ -241,7 +241,7 @@
+ 		sprintf (tmp2, "mouse%d", v - JSEM_MICE);
+ 	}
+ 	sprintf (tmp1, "joyport%d=%s\n", i, tmp2);
+-	cfgfile_write (f, tmp1);
++	cfgfile_write (f, "%s", tmp1);
+     }
+ 
+     cfgfile_write (f, "bsdsocket_emu=%s\n", p->socket_emu ? "true" : "false");
+--- uae-0.8.29/src/gui-gtk/gtkui.c~	2008-11-30 02:18:27.000000000 +0100
++++ uae-0.8.29/src/gui-gtk/gtkui.c	2014-01-22 19:47:25.142373825 +0100
+@@ -263,7 +263,7 @@
+     if (gui_available)
+ 	do_message_box (NULL, msg, TRUE, TRUE);
+ 
+-    write_log (msg);
++    write_log ("%s", msg);
+ }
+ 
+ /* Config save/load.  */
+--- uae-0.8.29/src/debug.c~	2008-11-30 02:18:27.000000000 +0100
++++ uae-0.8.29/src/debug.c	2014-01-22 19:48:14.752373465 +0100
+@@ -101,7 +101,7 @@
+ 
+ static void debug_help (void)
+ {
+-    console_out (help);
++    console_out ("%s", help);
+ }
+ 
+ 
+@@ -215,7 +215,7 @@
+ 	}
+ 	line[9 + cols * 5] = ' ';
+ 	line[9 + cols * 5 + 1 + 2 * cols] = 0;
+-	console_out (line);
++	console_out ("%s", line);
+ 	console_out ("\n");
+     }
+     *nxmem = addr;
diff --git a/xvidmode.patch b/xvidmode.patch
new file mode 100644
index 0000000..80a254b
--- /dev/null
+++ b/xvidmode.patch
@@ -0,0 +1,35 @@
+$OpenBSD$
+
+Was this code ever compiled, or tested???
+
+--- src/xwin.c.orig	Tue Nov  6 22:31:55 2012
++++ src/xwin.c	Tue Nov  6 23:00:35 2012
+@@ -245,8 +245,9 @@ static int vidmodecount;
+ 
+ static int sortfn (const void *a, const void *b)
+ {
+-    XF86VidModeInfo **ppa = a, *ppb = b;
+-    XF86VidModeInfo *pa = *ppa, *pb = *ppb;
++    XF86VidModeModeInfo **ppa = a, **ppb = b;
++    XF86VidModeModeInfo *pa = *ppa, *pb = *ppb;
++    
+     if (pa->hdisplay != pb->hdisplay)
+ 	return pa->hdisplay - pb->hdisplay;
+     return pa->vdisplay - pb->vdisplay;
+@@ -259,13 +260,13 @@ static int get_vidmodes (void)
+     if (!XF86VidModeGetAllModeLines (display, screen, &vidmodecount, &allmodes))
+ 	return 0;
+ 
+-    qsort (allmodes, vidmodecount, sizeof *allmode, sortfn);
++    qsort (allmodes, vidmodecount, sizeof *allmodes, sortfn);
+ 
+     gfx_fullscreen_modes = sizeof (struct uae_rect) * vidmodecount;
+     n_fullscreen_modes = vidmodecount;
+     for (i = 0; i < vidmodecount; i++) {
+-	gfx_fullscreen_modes[i].w = allmodes[i].hdisplay;
+-	gfx_fullscreen_modes[i].h = allmodes[i].vdisplay;
++	gfx_fullscreen_modes[i].w = allmodes[i]->hdisplay;
++	gfx_fullscreen_modes[i].h = allmodes[i]->vdisplay;
+     }
+ }
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/uae.git/commitdiff/d1fadf152cb9db25bdd0e5047a13b41a7ab15c78



More information about the pld-cvs-commit mailing list