From 29b130eb2c418f305dbb5668a83e292641604894 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Fri, 26 Jul 2002 14:51:23 +0000 Subject: do bounds checking on audio_track_map to never use audio channels which aren't there CVS patchset: 2356 CVS date: 2002/07/26 14:51:23 --- src/xine-engine/audio_decoder.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 5c1e31288..b40675912 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.81 2002/07/25 17:11:51 mroi Exp $ + * $Id: audio_decoder.c,v 1.82 2002/07/26 14:51:23 mroi Exp $ * * * functions that implement audio decoding @@ -221,8 +221,12 @@ void *audio_decoder_loop (void *this_gen) { } else audio_type = this->audio_track_map[0]; - } else - audio_type = this->audio_track_map[this->audio_channel_user]; + } else { + if (this->audio_channel_user <= this->audio_track_map_entries) + audio_type = this->audio_track_map[this->audio_channel_user]; + else + audio_type = -1; + } /* now, decode this buffer if it's the right audio type */ -- cgit v1.2.3