diff options
author | Christoph Mende <angelos@gentoo.org> | 2011-04-26 12:58:42 +0000 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2011-04-26 12:58:42 +0000 |
commit | 8709799f5a205a5e998ed72d3591c058fb64c2dc (patch) | |
tree | 7073b54aba754f22e7573253ab1bbf8169a03bbf | |
parent | Fixed overflow (bug 337090) (diff) | |
download | gentoo-2-8709799f5a205a5e998ed72d3591c058fb64c2dc.tar.gz gentoo-2-8709799f5a205a5e998ed72d3591c058fb64c2dc.tar.bz2 gentoo-2-8709799f5a205a5e998ed72d3591c058fb64c2dc.zip |
Use a different patch to fix the overflow, this is what upstream actually intended to do
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
-rw-r--r-- | media-sound/combine_wave/ChangeLog | 7 | ||||
-rw-r--r-- | media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild | 4 | ||||
-rw-r--r-- | media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch | 51 |
3 files changed, 33 insertions, 29 deletions
diff --git a/media-sound/combine_wave/ChangeLog b/media-sound/combine_wave/ChangeLog index ba6f537ba844..314b7254ec4c 100644 --- a/media-sound/combine_wave/ChangeLog +++ b/media-sound/combine_wave/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-sound/combine_wave # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/combine_wave/ChangeLog,v 1.6 2011/04/26 12:51:29 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/combine_wave/ChangeLog,v 1.7 2011/04/26 12:58:41 angelos Exp $ + + 26 Apr 2011; Christoph Mende <christoph@gentoo.org> + combine_wave-0.3.1-r1.ebuild, files/combine_wave-0.3.1-overflow.patch: + Use a different patch to fix the overflow, this is what upstream actually + intended to do *combine_wave-0.3.1-r1 (26 Apr 2011) diff --git a/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild b/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild index 38bdf8693696..dc1212ad9ae7 100644 --- a/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild +++ b/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild,v 1.1 2011/04/26 12:51:29 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/combine_wave/combine_wave-0.3.1-r1.ebuild,v 1.2 2011/04/26 12:58:41 angelos Exp $ EAPI="2" @@ -28,6 +28,6 @@ src_compile() { } src_install() { - dobin combine_wave + dobin combine_wave || die dodoc CHANGES README combine_wave.man } diff --git a/media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch b/media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch index 3174577dfb92..ee7fe38da458 100644 --- a/media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch +++ b/media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch @@ -1,27 +1,26 @@ -diff --git a/wave_header.h b/wave_header.h -index e1f6071..70d30e4 100644 ---- a/wave_header.h -+++ b/wave_header.h -@@ -3,10 +3,10 @@ +diff --git a/combine_wave.c b/combine_wave.c +index 5bfa4aa..391db25 100644 +--- a/combine_wave.c ++++ b/combine_wave.c +@@ -601,9 +601,9 @@ for(i = 0; i < header_size; i++) + *ptr = 0; + ptr++; + } +-strcpy(out_header -> main_chunk, "RIFF"); +-strcpy(out_header -> chunk_type, "WAVE"); +-strcpy(out_header -> sub_chunk, "fmt "); ++memcpy(out_header -> main_chunk, "RIFF", 4); ++memcpy(out_header -> chunk_type, "WAVE", 4); ++memcpy(out_header -> sub_chunk, "fmt ", 4); + out_header -> length_chunk = 16; //always 16 + out_header -> format = 1; //PCM - typedef struct - { /* header for WAV-Files */ -- char main_chunk[4]; /* 'RIFF' */ -+ char main_chunk[5]; /* 'RIFF' */ - uint32_t length; /* length of file */ -- char chunk_type[4]; /* 'WAVE' */ -- char sub_chunk[4]; /* 'fmt' */ -+ char chunk_type[5]; /* 'WAVE' */ -+ char sub_chunk[5]; /* 'fmt ' */ - uint32_t length_chunk; /* length sub_chunk, always 16 bytes */ - uint16_t format; /* always 1 = PCM-Code */ - uint16_t modus; /* 1 = Mono, 2 = Stereo */ -@@ -14,7 +14,7 @@ typedef struct - uint32_t byte_p_sec; /* Data per sec */ - uint16_t byte_p_spl; /* bytes per sample, 1=8 bit, 2=16 bit (mono) 2=8 bit, 4=16 bit (stereo) */ - uint16_t bit_p_spl; /* bits per sample, 8, 12, 16 */ -- char data_chunk[4]; /* 'data' */ -+ char data_chunk[5]; /* 'data' */ - uint32_t data_length; /* length of data */ - } wave_header; - +@@ -622,7 +622,7 @@ else + + out_header -> sample_fq = left_header -> sample_fq; + out_header -> bit_p_spl = 16; // left_header -> bit_p_spl; +-strcpy(out_header -> data_chunk, "data"); ++memcpy(out_header -> data_chunk, "data", 4); + + if(right_header -> data_length > left_header -> data_length) + { |