Commit df857558 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/shorten: Check residual size

Fixes assertion failure
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1283c424
......@@ -661,6 +661,10 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
* of get_sr_golomb_shorten(). */
if (s->version == 0)
residual_size--;
if (residual_size > 30U) {
av_log(avctx, AV_LOG_ERROR, "residual size unsupportd: %d\n", residual_size);
return AVERROR_INVALIDDATA;
}
}
/* calculate sample offset using means from previous blocks */
......
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