[FFmpeg-cvslog] wmadec: prevent null pointer call.
Michael Niedermayer
git at videolan.org
Tue Apr 26 03:00:28 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 25 16:16:44 2011 +0200| [7157334c375b7623dd52314d45cef3700896d0fe] | committer: Michael Niedermayer
wmadec: prevent null pointer call.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7157334c375b7623dd52314d45cef3700896d0fe
---
libavcodec/wmadec.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 5382999..fa20bea 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -489,6 +489,11 @@ static int wma_decode_block(WMACodecContext *s)
s->block_len_bits = s->frame_len_bits;
}
+ if (s->frame_len_bits - s->block_len_bits >= s->nb_block_sizes){
+ av_log(s->avctx, AV_LOG_ERROR, "block_len_bits not initialized to a valid value\n");
+ return -1;
+ }
+
/* now check if the block length is coherent with the frame length */
s->block_len = 1 << s->block_len_bits;
if ((s->block_pos + s->block_len) > s->frame_len){
More information about the ffmpeg-cvslog
mailing list