diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-02 04:32:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-02 04:32:47 +0000 |
commit | 810baca7406fa45d1bf9d4fb5d45127c49efdaed (patch) | |
tree | 6f5253dfbc2274f83205e56fab1d35bc3205c0a1 /app-cdr/bin2iso | |
parent | Added missing digest entries. (diff) | |
download | gentoo-2-810baca7406fa45d1bf9d4fb5d45127c49efdaed.tar.gz gentoo-2-810baca7406fa45d1bf9d4fb5d45127c49efdaed.tar.bz2 gentoo-2-810baca7406fa45d1bf9d4fb5d45127c49efdaed.zip |
Fix segfaults due to lack of error checking #90540 by Tiago Freire.
(Portage version: 2.0.51.20-r5)
Diffstat (limited to 'app-cdr/bin2iso')
-rw-r--r-- | app-cdr/bin2iso/ChangeLog | 11 | ||||
-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.patch | 30 | ||||
-rw-r--r-- | app-cdr/bin2iso/files/digest-bin2iso-19b-r2 (renamed from app-cdr/bin2iso/files/digest-bin2iso-19b-r1) | 0 |
4 files changed, 51 insertions, 7 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/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 |