--- mpg123/layer2.c.orig 2004-09-14 17:15:48.000000000 -0400 +++ mpg123/layer2.c 2004-09-14 17:18:49.000000000 -0400 @@ -287,6 +287,12 @@ fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : fr->II_sblimit; + /* security fix. */ + if (fr->jsbound > fr->II_sblimit) { + fprintf(stderr, "Truncating stereo boundary to sideband limit.\n"); + fr->jsbound=fr->II_sblimit; + } + if(stereo == 1 || single == 3) single = 0;