From 7d997a77166b94aea43afbbc252f1aa0af00a7fa Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Jun 2012 17:09:49 +0100 Subject: Double-free with some AAC files (missing check). --- src/libfaad/xine_faad_decoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libfaad/xine_faad_decoder.c b/src/libfaad/xine_faad_decoder.c index 86dc7d6d3..af0c6f967 100644 --- a/src/libfaad/xine_faad_decoder.c +++ b/src/libfaad/xine_faad_decoder.c @@ -249,8 +249,10 @@ static void faad_decode_audio ( faad_decoder_t *this, int end_frame ) { lprintf("faacDecDecode() returned rate=%"PRId32" channels=%d used=%d\n", this->rate, this->num_channels, used); - this->stream->audio_out->close (this->stream->audio_out, this->stream); - this->output_open = 0; + if (this->output_open) { + this->stream->audio_out->close (this->stream->audio_out, this->stream); + this->output_open = 0; + } faad_open_output( this ); faad_meta_info_set( this ); -- cgit v1.2.3 From 8eae9306239d6683d7cd06bf92be02bbd1c43865 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Jun 2012 15:38:03 +0100 Subject: Fix a possible NULL dereference when cleaning up in the FFT vis plugin code. --- src/post/visualizations/fft.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/post/visualizations/fft.c b/src/post/visualizations/fft.c index 7e32dbbf6..ac109e379 100644 --- a/src/post/visualizations/fft.c +++ b/src/post/visualizations/fft.c @@ -153,10 +153,13 @@ fft_t *fft_new (int bits) void fft_dispose(fft_t *fft) { - free(fft->SineTable); - free(fft->CosineTable); - free(fft->WinTable); - free(fft); + if (fft) + { + free(fft->SineTable); + free(fft->CosineTable); + free(fft->WinTable); + free(fft); + } } /* -- cgit v1.2.3 From 5f5e4800790e0539e8df5d8449e599236ad0116c Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Jun 2012 17:15:05 +0100 Subject: Correct detection of AAC ADIF. --- src/demuxers/demux_aac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/demuxers/demux_aac.c b/src/demuxers/demux_aac.c index 0ac645b78..eb12c065e 100644 --- a/src/demuxers/demux_aac.c +++ b/src/demuxers/demux_aac.c @@ -95,7 +95,7 @@ static int open_aac_file(demux_aac_t *this) { return 0; /* Check for an ADIF header - should be at the start of the file */ - if (_x_is_fourcc(peak, "AIDF")) { + if (_x_is_fourcc(peak, "ADIF")) { lprintf("found ADIF header\n"); return 1; } -- cgit v1.2.3