summaryrefslogtreecommitdiff
path: root/libavcodec/shorten.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r--libavcodec/shorten.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index c465fffe05..c93ba6b026 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -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));