From 47a758b6c2da48df10848c4a44040897813b6319 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Sat, 20 Aug 2005 21:16:09 +0000 Subject: [PATCH] applied hotfix, but this decoder needs to be replaced with something secure and stable git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14004 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/plugins/mp3_decoder/mpglib/layer2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/add-ons/media/plugins/mp3_decoder/mpglib/layer2.c b/src/add-ons/media/plugins/mp3_decoder/mpglib/layer2.c index 602522e0bd..3f5dbc897c 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mpglib/layer2.c +++ b/src/add-ons/media/plugins/mp3_decoder/mpglib/layer2.c @@ -264,6 +264,11 @@ int do_layer2(struct mpstr *mp, struct frame *fr,unsigned char *pcm_sample,int * fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : fr->II_sblimit; + if (fr->jsbound > fr->II_sblimit) { + fprintf(stderr, "libmpg123 layer2: Truncating stereo boundary to sideband limit.\n"); + fr->jsbound=fr->II_sblimit; + } + if(stereo == 1 || single == 3) single = 0;