[FFmpeg-cvslog] mpc7: Fix memset call in mpc7_decode_frame function

Alex Converse git at videolan.org
Fri Nov 11 02:53:07 CET 2011


ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Wed Nov  9 13:40:44 2011 -0800| [88b2436911ea9d629d0bc380afc6570eecef84bd] | committer: Alex Converse

mpc7: Fix memset call in mpc7_decode_frame function

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88b2436911ea9d629d0bc380afc6570eecef84bd
---

 libavcodec/mpc7.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 6f79c7b..60b9f52 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -200,7 +200,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx,
     int off, out_size;
     int bits_used, bits_avail;
 
-    memset(bands, 0, sizeof(bands));
+    memset(bands, 0, sizeof(*bands) * (c->maxbands + 1));
     if(buf_size <= 4){
         av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);
         return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list