Commit ec8a4841 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Avoid a deadlock when decoding wma.

Fixes ticket #2925.
parent cdd5df81
......@@ -512,6 +512,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment