Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-11-11 19:40:08 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-11-13 03:41:26 +0300
commit8e104619a627fcf5f4c2bd3c09d0c2d323aae745 (patch)
treeaaf151d844e967cd983ebd04b52575338fb54924 /libavcodec/shorten.c
parentd5d2d6c3b8cff61eb26c18bbd977881cf6d5524a (diff)
shorten: check for return value
Avoid a possible negative bitshift. CC: libav-stable@libav.org Bug-Id: CID 1194400
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));