diff options
| author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-09-02 08:32:24 +0200 |
|---|---|---|
| committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-09-02 10:03:49 +0200 |
| commit | a5ef62ede16a3245507f3d596faa45c775603052 (patch) | |
| tree | b42cb9771a68f8b122d6e7cfafd54d5a6427ef7b | |
| parent | d3ef17740d930ba114deffac93d2eef898f3e77f (diff) | |
| download | ffmpeg-a5ef62ede16a3245507f3d596faa45c775603052.tar.gz | |
Avoid a deadlock when decoding wma.
Fixes ticket #2925.
(cherry picked from commit ec8a4841f7e81040f9a2757f23e70dff5e6b33a4)
| -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 f26a1433a9..329150d4d7 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -529,6 +529,10 @@ static int wma_decode_block(WMACodecContext *s) coef escape coding */ total_gain = 1; for(;;) { + if (get_bits_left(&s->gb) < 7) { + av_log(s->avctx, AV_LOG_ERROR, "total_gain overread\n"); + return AVERROR_INVALIDDATA; + } a = get_bits(&s->gb, 7); total_gain += a; if (a != 127) |
