openbsd-ports/audio/mpg123/patches/patch-layer2_c
pvalchev e0cda5f23d fix buffer overflow, can allow arbitrary code execution by playing an mp3
with specially crafted header; "Davide Del Vecchio" <dante@alighieri.org>
2004-09-07 21:23:24 +00:00

16 lines
511 B
Plaintext

$OpenBSD: patch-layer2_c,v 1.1 2004/09/07 21:23:24 pvalchev Exp $
--- layer2.c.orig Tue Sep 7 15:13:46 2004
+++ layer2.c Tue Sep 7 15:14:44 2004
@@ -265,6 +265,11 @@ int do_layer2(struct frame *fr,int outmo
fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
(fr->mode_ext<<2)+4 : fr->II_sblimit;
+ 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;