# HG changeset patch # User michael # Date 1075909795 0 # Node ID cc4c1eb18eecef63e477406ceb5602c87ed651fd # Parent 9848ca4ad861c26cd874d3bd3a3e298b550d50c4 fixes by Gildas Bazin diff -r 9848ca4ad861 -r cc4c1eb18eec mpegaudiodec.c --- a/mpegaudiodec.c Tue Feb 03 04:27:17 2004 +0000 +++ b/mpegaudiodec.c Wed Feb 04 15:49:55 2004 +0000 @@ -1231,6 +1231,7 @@ int mpa_decode_header(AVCodecContext *avctx, uint32_t head) { MPADecodeContext s1, *s = &s1; + memset( s, 0, sizeof(MPADecodeContext) ); if (check_header(head) != 0) return -1; @@ -1373,6 +1374,10 @@ bound = sblimit; dprintf("bound=%d sblimit=%d\n", bound, sblimit); + + /* sanity check */ + if( bound > sblimit ) bound = sblimit; + /* parse bit allocation */ j = 0; for(i=0;i