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). --- ChangeLog | 1 + src/libfaad/xine_faad_decoder.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dda6b1ee3..16ba11b74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ xine-lib (1.1.21) ????-??-?? + * Fix a potential double-free (goom) when playing AAC files. * Fix matroska header compression. * MPEG-TS fixes and enhancements * Improved syncing of DVB subtitles 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