Fix segmentation fault in faad due to an incorrect pointer size (Closes: #603807, LP: #665802).
Conflicts:
debian/patches/series
Andres Mejia
13 years ago
0 | Description: faad segfaults on amd64 due to incorrect pointer size | |
1 | When running faad with a command line similar to: | |
2 | alessio@alessio-laptop:~$ faad -b 2 -f 2 -w sample.aac | |
3 | a SIGSEGV gets raised. This issue is due to an incorrect pointer size | |
4 | used in the write_audio{32,64}bit functions. | |
5 | Origin: Ubuntu | |
6 | Bug: https://sourceforge.net/support/tracker.php?aid=3110758 | |
7 | Bug-Debian: http://bugs.debian.org/603807 | |
8 | Bug-Ubuntu: https://launchpad.net/bugs/665802 | |
9 | Reviewed-by: Alessio Treglia <alessio@debian.org> | |
10 | Last-Update: 2010-11-17 | |
11 | --- | |
12 | frontend/audio.c | 4 ++-- | |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
14 | ||
15 | --- faad2.orig/frontend/audio.c | |
16 | +++ faad2/frontend/audio.c | |
17 | @@ -347,7 +347,7 @@ static int write_audio_24bit(audio_file | |
18 | { | |
19 | int ret; | |
20 | unsigned int i; | |
21 | - long *sample_buffer24 = (long*)sample_buffer; | |
22 | + int *sample_buffer24 = (int*)sample_buffer; | |
23 | char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8); | |
24 | ||
25 | aufile->total_samples += samples; | |
26 | @@ -391,7 +391,7 @@ static int write_audio_32bit(audio_file | |
27 | { | |
28 | int ret; | |
29 | unsigned int i; | |
30 | - long *sample_buffer32 = (long*)sample_buffer; | |
31 | + int *sample_buffer32 = (int*)sample_buffer; | |
32 | char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8); | |
33 | ||
34 | aufile->total_samples += samples; |