summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-02 04:32:47 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-02 04:32:47 +0000
commit559b8aee6d7ae0699f4a9123a8addf5d6e238019 (patch)
treebb45005a37797fa416f04322890e7d2204720280 /app-cdr
parentAdded missing digest entries. (diff)
downloadhistorical-559b8aee6d7ae0699f4a9123a8addf5d6e238019.tar.gz
historical-559b8aee6d7ae0699f4a9123a8addf5d6e238019.tar.bz2
historical-559b8aee6d7ae0699f4a9123a8addf5d6e238019.zip
Fix segfaults due to lack of error checking #90540 by Tiago Freire.
Package-Manager: portage-2.0.51.20-r5
Diffstat (limited to 'app-cdr')
-rw-r--r--app-cdr/bin2iso/ChangeLog11
-rw-r--r--app-cdr/bin2iso/Manifest7
-rw-r--r--app-cdr/bin2iso/bin2iso-19b-r2.ebuild (renamed from app-cdr/bin2iso/bin2iso-19b-r1.ebuild)17
-rw-r--r--app-cdr/bin2iso/files/bin2iso-19b-sanity-checks.patch30
-rw-r--r--app-cdr/bin2iso/files/digest-bin2iso-19b-r2 (renamed from app-cdr/bin2iso/files/digest-bin2iso-19b-r1)0
5 files changed, 55 insertions, 10 deletions
diff --git a/app-cdr/bin2iso/ChangeLog b/app-cdr/bin2iso/ChangeLog
index c52435f86c3a..0b4a3d1c627d 100644
--- a/app-cdr/bin2iso/ChangeLog
+++ b/app-cdr/bin2iso/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-cdr/bin2iso
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/bin2iso/ChangeLog,v 1.17 2005/01/01 12:08:00 eradicator Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/bin2iso/ChangeLog,v 1.18 2005/05/02 04:32:47 vapier Exp $
+
+*bin2iso-19b-r2 (02 May 2005)
+
+ 02 May 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/bin2iso-19b-sanity-checks.patch, -bin2iso-19b-r1.ebuild,
+ +bin2iso-19b-r2.ebuild:
+ Fix segfaults due to lack of error checking #90540 by Tiago Freire.
03 Apr 2004; Daniel Ahlberg <aliz@gentoo.org> bin2iso-19b-r1.ebuild:
Adding amd64 keyword, closing #46530.
diff --git a/app-cdr/bin2iso/Manifest b/app-cdr/bin2iso/Manifest
index f6f84bc66448..cb92f4e4b63d 100644
--- a/app-cdr/bin2iso/Manifest
+++ b/app-cdr/bin2iso/Manifest
@@ -1,4 +1,5 @@
-MD5 753ce311996195981c2d163e02bb128d ChangeLog 1427
-MD5 976fc37b51b24cb10666e97ab51701d1 bin2iso-19b-r1.ebuild 688
+MD5 61de4b921f62bf7c3e110f450633fc36 ChangeLog 1667
MD5 60f8a95b950aa289314f78f7c613159e metadata.xml 350
-MD5 eb935e5dd2ad208646f2760ee3358339 files/digest-bin2iso-19b-r1 62
+MD5 2341f6ec2fc9b19e5838fb8ab5ce99a5 bin2iso-19b-r2.ebuild 804
+MD5 14e64a9db73c17612f1acbacd7731a50 files/bin2iso-19b-sanity-checks.patch 877
+MD5 eb935e5dd2ad208646f2760ee3358339 files/digest-bin2iso-19b-r2 62
diff --git a/app-cdr/bin2iso/bin2iso-19b-r1.ebuild b/app-cdr/bin2iso/bin2iso-19b-r2.ebuild
index d5e9ae1c2e91..f4974d47f838 100644
--- a/app-cdr/bin2iso/bin2iso-19b-r1.ebuild
+++ b/app-cdr/bin2iso/bin2iso-19b-r2.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/bin2iso/bin2iso-19b-r1.ebuild,v 1.17 2005/01/01 12:08:00 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/bin2iso/bin2iso-19b-r2.ebuild,v 1.1 2005/05/02 04:32:47 vapier Exp $
-inherit gcc
+inherit eutils toolchain-funcs
DESCRIPTION="converts RAW format (.bin/.cue) files to ISO/WAV format"
HOMEPAGE="http://users.andara.com/~doiron/bin2iso/"
@@ -10,15 +10,22 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2"
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="x86 ppc sparc alpha amd64"
+KEYWORDS="alpha amd64 ppc sparc x86"
IUSE=""
-DEPEND="virtual/libc"
+DEPEND=""
S=${WORKDIR}/${PN}
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ edos2unix *.c
+ epatch "${FILESDIR}"/${P}-sanity-checks.patch
+}
+
src_compile() {
- $(gcc-getCC) bin2iso19b_linux.c -o ${PN} ${CFLAGS} || die "compile failed"
+ $(tc-getCC) bin2iso19b_linux.c -o ${PN} ${CFLAGS} ${LDFLAGS} || die "compile failed"
}
src_install() {
diff --git a/app-cdr/bin2iso/files/bin2iso-19b-sanity-checks.patch b/app-cdr/bin2iso/files/bin2iso-19b-sanity-checks.patch
new file mode 100644
index 000000000000..5803bc103a86
--- /dev/null
+++ b/app-cdr/bin2iso/files/bin2iso-19b-sanity-checks.patch
@@ -0,0 +1,30 @@
+Add more checks to prevent segfaults in ill-formatted files
+
+http://bugs.gentoo.org/show_bug.cgi?id=90540
+
+--- bin2iso19b_linux.c
++++ bin2iso19b_linux.c
+@@ -237,6 +237,10 @@
+ // Get the 'mode'
+ if (strncmp(&Line[2], "TRACK ", 6)==0)
+ {
++ if (Line[8] < '0' || Line[8] > '9' || Line[9] < '0' || Line[9] > '9') {
++ printf("Error: Track # is not a 2 digit number\n");
++ exit(1);
++ }
+ strncpy(track->num, &Line[8], 2); track->num[2] = '\0';
+
+ track->mode = UNKNOWN;
+@@ -246,7 +250,11 @@
+ if(strncmp(&Line[11], "MODE2/2352", 10)==0) track->mode = MODE2_2352;
+ if(strncmp(&Line[11], "MODE2/2336", 10)==0) track->mode = MODE2_2336;
+ }
+- else return(1);
++ else
++ {
++ printf("Error: 2nd line does not begin with ' TRACK '\n");
++ exit(1);
++ }
+
+ // Set the name
+ strcpy(track->name, sBinFilename);
diff --git a/app-cdr/bin2iso/files/digest-bin2iso-19b-r1 b/app-cdr/bin2iso/files/digest-bin2iso-19b-r2
index 941c8d1f8e7c..941c8d1f8e7c 100644
--- a/app-cdr/bin2iso/files/digest-bin2iso-19b-r1
+++ b/app-cdr/bin2iso/files/digest-bin2iso-19b-r2