mirror of https://git.ffmpeg.org/ffmpeg.git
shorten: check for return value
Avoid a possible negative bitshift. CC: libav-stable@libav.org Bug-Id: CID 1194400
This commit is contained in:
parent
d5d2d6c3b8
commit
8e104619a6
|
@ -510,6 +510,8 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
|
|||
break;
|
||||
case FN_BITSHIFT:
|
||||
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
|
||||
if (s->bitshift < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
break;
|
||||
case FN_BLOCKSIZE: {
|
||||
unsigned blocksize = get_uint(s, av_log2(s->blocksize));
|
||||
|
|
Loading…
Reference in New Issue