ffmpeg | branch: master | Vittorio Giovara <[email protected]> | Tue Nov 11 17:40:08 2014 +0100| [8e104619a627fcf5f4c2bd3c09d0c2d323aae745] | committer: Vittorio Giovara
shorten: check for return value Avoid a possible negative bitshift. CC: [email protected] Bug-Id: CID 1194400 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e104619a627fcf5f4c2bd3c09d0c2d323aae745 --- libavcodec/shorten.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index c465fff..c93ba6b 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)); _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
