Commit b399cbfb authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Prevent block size from inreasing in the shorten decoder.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 581898ae
......@@ -482,9 +482,15 @@ static int shorten_decode_frame(AVCodecContext *avctx,
case FN_BITSHIFT:
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
break;
case FN_BLOCKSIZE:
s->blocksize = get_uint(s, av_log2(s->blocksize));
case FN_BLOCKSIZE: {
int blocksize = get_uint(s, av_log2(s->blocksize));
if (blocksize > s->blocksize) {
av_log(avctx, AV_LOG_ERROR, "Increasing block size is not supported\n");
return AVERROR_PATCHWELCOME;
}
s->blocksize = blocksize;
break;
}
case FN_QUIT:
*data_size = 0;
return buf_size;
......
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