diff options
author | Christoph Mende <angelos@gentoo.org> | 2011-05-07 17:22:54 +0000 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2011-05-07 17:22:54 +0000 |
commit | 06808c12f21e3a75d04342d7b0f46d072b5c9067 (patch) | |
tree | 51a0ae63d70e72066d38e5ef61e86b5d8d2dcffc /media-sound/pwavecat | |
parent | alpha/arm/ia64/m68k/s390/sh/sparc/x86 stable wrt #363943 (diff) | |
download | gentoo-2-06808c12f21e3a75d04342d7b0f46d072b5c9067.tar.gz gentoo-2-06808c12f21e3a75d04342d7b0f46d072b5c9067.tar.bz2 gentoo-2-06808c12f21e3a75d04342d7b0f46d072b5c9067.zip |
Fix possible overflows (bug #340167)
(Portage version: 2.2.0_alpha31/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/pwavecat')
-rw-r--r-- | media-sound/pwavecat/ChangeLog | 8 | ||||
-rw-r--r-- | media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch | 27 | ||||
-rw-r--r-- | media-sound/pwavecat/pwavecat-0.4.5.ebuild | 9 |
3 files changed, 38 insertions, 6 deletions
diff --git a/media-sound/pwavecat/ChangeLog b/media-sound/pwavecat/ChangeLog index dc97e45b01b7..e2729c68079e 100644 --- a/media-sound/pwavecat/ChangeLog +++ b/media-sound/pwavecat/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/pwavecat -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pwavecat/ChangeLog,v 1.2 2010/07/21 00:03:38 sbriesen Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pwavecat/ChangeLog,v 1.3 2011/05/07 17:22:54 angelos Exp $ + + 07 May 2011; Christoph Mende <angelos@gentoo.org> pwavecat-0.4.5.ebuild, + +files/pwavecat-0.4.5-overflow.patch: + Fix possible overflows (bug #340167) 21 Jul 2010; Stefan Briesenick <sbriesen@gentoo.org> pwavecat-0.4.5.ebuild: diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch b/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch new file mode 100644 index 000000000000..f3d54221bc7d --- /dev/null +++ b/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch @@ -0,0 +1,27 @@ +diff --git a/parts.c b/parts.c +index 670d0d5..a59ad98 100644 +--- a/parts.c ++++ b/parts.c +@@ -338,10 +338,10 @@ if(! file_header) + return 0; + } + +-strcpy(file_header -> main_chunk, "RIFF"); ++memcpy(file_header -> main_chunk, "RIFF", 4); + file_header -> length = length + header_size - 8; +-strcpy(file_header -> chunk_type, "WAVE"); +-strcpy(file_header -> sub_chunk, "fmt "); // watch out the zero termination overwrites next var ++memcpy(file_header -> chunk_type, "WAVE", 4); ++memcpy(file_header -> sub_chunk, "fmt ", 4); // watch out the zero termination overwrites next var + file_header -> length_chunk = 16; //always 16 + file_header -> format = 1; //PCM + file_header -> modus = modus; // stereo +@@ -349,7 +349,7 @@ file_header -> sample_fq = sample_fq; // 44100, 48000, etc... + file_header -> byte_p_sec = byte_p_sec; // little endian + file_header -> byte_p_spl = byte_p_spl; // 4 stereo + file_header -> bit_p_spl = bit_p_spl; // 16 bits +-strcpy(file_header -> data_chunk, "data"); // watch out the zero termination overwrites next var ++memcpy(file_header -> data_chunk, "data", 4); // watch out the zero termination overwrites next var + file_header -> data_length = (unsigned long)length; + + if(debug_flag) diff --git a/media-sound/pwavecat/pwavecat-0.4.5.ebuild b/media-sound/pwavecat/pwavecat-0.4.5.ebuild index 836e72519523..d6644e73cf9f 100644 --- a/media-sound/pwavecat/pwavecat-0.4.5.ebuild +++ b/media-sound/pwavecat/pwavecat-0.4.5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pwavecat/pwavecat-0.4.5.ebuild,v 1.2 2010/07/21 00:03:38 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pwavecat/pwavecat-0.4.5.ebuild,v 1.3 2011/05/07 17:22:54 angelos Exp $ EAPI="2" @@ -17,7 +17,8 @@ SLOT="0" KEYWORDS="~amd64 ~x86" src_prepare() { - epatch "${FILESDIR}/${P}.diff" + epatch "${FILESDIR}/${P}.diff" \ + "${FILESDIR}"/${P}-overflow.patch } src_compile() { @@ -26,6 +27,6 @@ src_compile() { } src_install() { - dobin pwavecat + dobin pwavecat || die dodoc CHANGES README } |