diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-03 16:50:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-03 16:50:47 +0100 |
commit | 6c6dc8ccea56d264d54c677215fc8faf94587919 (patch) | |
tree | 698cbd79dbaff030b1a2e79ff96254d968bc237a /libavcodec/wmadec.c | |
parent | 3fac99cd9d002423a746522736f93742c84df018 (diff) | |
download | ffmpeg-6c6dc8ccea56d264d54c677215fc8faf94587919.tar.gz |
wmadec: check nb_frames
Improves error message for Ticket968
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r-- | libavcodec/wmadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index df5089fb32..cdd285002d 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -827,6 +827,10 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, /* read super frame header */ skip_bits(&s->gb, 4); /* super frame index */ nb_frames = get_bits(&s->gb, 4) - (s->last_superframe_len <= 0); + if (nb_frames <= 0) { + av_log(avctx, AV_LOG_ERROR, "nb_frames is %d\n", nb_frames); + return AVERROR_INVALIDDATA; + } } else { nb_frames = 1; } |