summaryrefslogtreecommitdiff
blob: 657ff24bbf759c8644c6cfcd29477db0411e8e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- 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
 
@@ -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) 
 	{