summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2010-12-01 10:06:53 +0000
committerAlfredo Tupone <tupone@gentoo.org>2010-12-01 10:06:53 +0000
commit7d5c1c21ba0e73732cbb3ad0c67da5f0957d255f (patch)
treec77219aab14ec8a611ea222ced762abe9c6e7b92 /games-emulation
parentEAPI 3 bump. Listen to CFLAGS/CXXFLAGS. Better grouping of econf options. (diff)
downloadhistorical-7d5c1c21ba0e73732cbb3ad0c67da5f0957d255f.tar.gz
historical-7d5c1c21ba0e73732cbb3ad0c67da5f0957d255f.tar.bz2
historical-7d5c1c21ba0e73732cbb3ad0c67da5f0957d255f.zip
Fix buffer overflow. Bug #325281
Package-Manager: portage-2.1.9.25/cvs/Linux i686
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/gxmame/ChangeLog8
-rw-r--r--games-emulation/gxmame/Manifest5
-rw-r--r--games-emulation/gxmame/files/gxmame-0.35_beta2-ovflfix.patch29
-rw-r--r--games-emulation/gxmame/gxmame-0.35_beta2.ebuild15
4 files changed, 45 insertions, 12 deletions
diff --git a/games-emulation/gxmame/ChangeLog b/games-emulation/gxmame/ChangeLog
index 9c05c3a2460a..e6e2d9720620 100644
--- a/games-emulation/gxmame/ChangeLog
+++ b/games-emulation/gxmame/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-emulation/gxmame
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/gxmame/ChangeLog,v 1.20 2008/04/08 01:44:15 mr_bones_ Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/gxmame/ChangeLog,v 1.21 2010/12/01 10:06:53 tupone Exp $
+
+ 01 Dec 2010; Tupone Alfredo <tupone@gentoo.org> gxmame-0.35_beta2.ebuild,
+ +files/gxmame-0.35_beta2-ovflfix.patch:
+ Fix buffer overflow. Bug #325281 by David Carlos Manuelda
08 Apr 2008; Michael Sterrett <mr_bones_@gentoo.org>
gxmame-0.35_beta2.ebuild:
diff --git a/games-emulation/gxmame/Manifest b/games-emulation/gxmame/Manifest
index 73f63da70c22..908cd4ccebfb 100644
--- a/games-emulation/gxmame/Manifest
+++ b/games-emulation/gxmame/Manifest
@@ -1,4 +1,5 @@
+AUX gxmame-0.35_beta2-ovflfix.patch 1488 RMD160 ef7df7eb407a018fb9047207d5916ebd7fd2f216 SHA1 af134bdf965996ba333a4d8d64f419e6a430686b SHA256 ff0bfabe24b822fbfa40dc04ca498bc43b0686609fe4fb7fc673ff60923a5b08
DIST gxmame-0.35beta2.tar.gz 697013 RMD160 baa658cc6794b10349da173e8e86821c0bace004 SHA1 aec51bd8c111db47a684cdfda2e604db8c61c037 SHA256 6d0339bf334f40ff0b972cf5c4df14660c48a2f0bce10f23d6a0feb3d5c83622
-EBUILD gxmame-0.35_beta2.ebuild 1949 RMD160 2b4037b18e79f651f1219f4e2f7bb99f1f1eef2b SHA1 084bb81b9c9b873f24c790780a788d1b5ddd4294 SHA256 afb5330aea33496fc23a1bda14d67c79d913f0b165572d1475c127765f2d3b27
-MISC ChangeLog 3233 RMD160 51b2ad8ef83f077303a75213135af97977c8c5ee SHA1 960f508955439d3775dce07b1e931ec492570c46 SHA256 0c5c81f1eef0050c5dcd7643f3be79fc351dd68e9e92ac1029a248e9bf7123f4
+EBUILD gxmame-0.35_beta2.ebuild 1952 RMD160 aaa232df66de64b8b1c200ada3524ec8d0a5a387 SHA1 b949f9eeca2dc231fdbd22642e5d134a79408b07 SHA256 33088b0be5bd4ab18e2eeff3dcb150cae6681522a27e3311dca78485f9c8f006
+MISC ChangeLog 3409 RMD160 e8a26c78122a5457381faead049c5cf7bd2338fb SHA1 dacb618f92a1a68a687d5536e5c8ddf99b099b85 SHA256 a6721e870ef155f5732be65b5adbd6d424c8fb4297e3f3f7dfad6de28bfa48de
MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3
diff --git a/games-emulation/gxmame/files/gxmame-0.35_beta2-ovflfix.patch b/games-emulation/gxmame/files/gxmame-0.35_beta2-ovflfix.patch
new file mode 100644
index 000000000000..8831a3e09b61
--- /dev/null
+++ b/games-emulation/gxmame/files/gxmame-0.35_beta2-ovflfix.patch
@@ -0,0 +1,29 @@
+--- src/options.c.old 2010-12-01 10:48:45.000000000 +0100
++++ src/options.c 2010-12-01 10:53:55.000000000 +0100
+@@ -4245,7 +4245,7 @@
+ case XMAME_EXEC_SVGAFX:
+ target->fxgkeepaspect = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fxgkeepaspect_checkbutton));
+ used_text = gtk_editable_get_chars (GTK_EDITABLE (fx_entry), 0, -1);
+- strncpy (target->resolution, used_text, 20);
++ strncpy (target->resolution, used_text, sizeof(target->resolution));
+ g_free (used_text);
+ break;
+
+@@ -4330,7 +4330,7 @@
+ }
+
+ used_text = gtk_editable_get_chars (GTK_EDITABLE (soundfile_entry), 0, -1);
+- strncpy (target->soundfile, used_text, 50);
++ strncpy (target->soundfile, used_text, sizeof(target->soundfile));
+ g_free (used_text);
+
+ target->timer = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (timer_checkbutton));
+@@ -4465,7 +4465,7 @@
+ target->skip_disclaimer = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (disclaimer_checkbutton));
+ target->skip_gameinfo = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gameinfo_checkbutton));
+ used_text = gtk_editable_get_chars (GTK_EDITABLE (debug_size_combo_entry), 0, -1);
+- strncpy (target->debug_size, used_text, 20);
++ strncpy (target->debug_size, used_text, sizeof(target->debug_size));
+ g_free (used_text);
+ target->use_additional_options = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (additional_options_checkbutton));
+ /* here I'm using directly the additional option because I don't know its length */
diff --git a/games-emulation/gxmame/gxmame-0.35_beta2.ebuild b/games-emulation/gxmame/gxmame-0.35_beta2.ebuild
index 91a4d6e16416..1464c33c9049 100644
--- a/games-emulation/gxmame/gxmame-0.35_beta2.ebuild
+++ b/games-emulation/gxmame/gxmame-0.35_beta2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/gxmame/gxmame-0.35_beta2.ebuild,v 1.9 2008/04/08 01:44:15 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/gxmame/gxmame-0.35_beta2.ebuild,v 1.10 2010/12/01 10:06:53 tupone Exp $
+EAPI=2
-inherit games
+inherit eutils games
MY_P="${PN}-${PV/_beta/beta}"
DESCRIPTION="frontend for XMame using the GTK library"
@@ -25,9 +26,8 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${MY_P}
-src_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ovflfix.patch
sed -i \
-e "s:-O2 -fomit-frame-pointer -ffast-math:${CFLAGS}:" \
-e "s:-O2:${CFLAGS}:" \
@@ -51,14 +51,13 @@ src_unpack() {
|| die "sed failed"
}
-src_compile() {
+src_configure() {
egamesconf \
--disable-dependency-tracking \
--with-xmame-dir="${GAMES_DATADIR}"/xmame \
$(use_enable nls) \
$(use_enable joystick) \
|| die
- emake || die "emake failed"
}
src_install() {