1 |
angelos 11/04/26 13:02:50 |
2 |
|
3 |
Added: substract_wave-0.3-overflow.patch |
4 |
Log: |
5 |
Fixed overflow (bug 337446)) |
6 |
|
7 |
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-sound/substract_wave/files/substract_wave-0.3-overflow.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/substract_wave/files/substract_wave-0.3-overflow.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/substract_wave/files/substract_wave-0.3-overflow.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: substract_wave-0.3-overflow.patch |
16 |
=================================================================== |
17 |
diff --git a/substract_wave.c b/substract_wave.c |
18 |
index a44e5e5..bef211b 100644 |
19 |
--- a/substract_wave.c |
20 |
+++ b/substract_wave.c |
21 |
@@ -545,9 +545,9 @@ for(i = 0; i < header_size; i++) |
22 |
*ptr = 0; |
23 |
ptr++; |
24 |
} |
25 |
-strcpy(out_header -> main_chunk, "RIFF"); |
26 |
-strcpy(out_header -> chunk_type, "WAVE"); |
27 |
-strcpy(out_header -> sub_chunk, "fmt "); |
28 |
+memcpy(out_header -> main_chunk, "RIFF", 4); |
29 |
+memcpy(out_header -> chunk_type, "WAVE", 4); |
30 |
+memcpy(out_header -> sub_chunk, "fmt ", 4); |
31 |
out_header -> length_chunk = 16; //always 16 |
32 |
out_header -> format = 1; //PCM |
33 |
|
34 |
@@ -557,7 +557,7 @@ out_header -> byte_p_spl = main_header -> byte_p_spl; |
35 |
|
36 |
out_header -> sample_fq = main_header -> sample_fq; |
37 |
out_header -> bit_p_spl = 16; // main_header -> bit_p_spl; |
38 |
-strcpy(out_header -> data_chunk, "data"); |
39 |
+memcpy(out_header -> data_chunk, "data", 4); |
40 |
|
41 |
main_offset = start_offset + (samples_offset * 2); |