summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2011-04-26 12:58:42 +0000
committerChristoph Mende <angelos@gentoo.org>2011-04-26 12:58:42 +0000
commit8709799f5a205a5e998ed72d3591c058fb64c2dc (patch)
tree7073b54aba754f22e7573253ab1bbf8169a03bbf /media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch
parentFixed overflow (bug 337090) (diff)
downloadgentoo-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)
Diffstat (limited to 'media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch')
-rw-r--r--media-sound/combine_wave/files/combine_wave-0.3.1-overflow.patch51
1 files changed, 25 insertions, 26 deletions
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)
+ {