[FFmpeg-cvslog] wmavoice: Use proper size in memeset().

Alex Converse git at videolan.org
Sat May 7 04:14:45 CEST 2011


ffmpeg | branch: master | Alex Converse <aconverse at google.com> | Thu May  5 11:10:19 2011 -0700| [869303bebd0c25dc10d88139d6a603eb6b50c71d] | committer: Alex Converse

wmavoice: Use proper size in memeset().

sizeof(array_functrion_argument) gives the size of the pointer type not
the size of the array to which it points.

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

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

diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 8dea30c..4e69b83 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -315,7 +315,7 @@ static av_cold int decode_vbmtree(GetBitContext *gb, int8_t vbm_tree[25])
     };
     int cntr[8], n, res;
 
-    memset(vbm_tree, 0xff, sizeof(vbm_tree));
+    memset(vbm_tree, 0xff, sizeof(vbm_tree[0]) * 25);
     memset(cntr,     0,    sizeof(cntr));
     for (n = 0; n < 17; n++) {
         res = get_bits(gb, 3);



More information about the ffmpeg-cvslog mailing list