diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-07 17:23:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-07 18:22:31 +0100 |
commit | e00499eb4c80752b2c464f3a98bf0b6ce7b1e212 (patch) | |
tree | 6ef24e01ae2945242323d5aca3d3fffac4734ef0 | |
parent | dfffc4aadc7c8c615190ddb4a08cd451ac9b1020 (diff) | |
download | ffmpeg-e00499eb4c80752b2c464f3a98bf0b6ce7b1e212.tar.gz |
avcodec/libxvid: fix potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libxvid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 7669fee943..b6840ee358 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -713,7 +713,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, xvid_enc_frame_t xvid_enc_frame = { 0 }; xvid_enc_stats_t xvid_enc_stats = { 0 }; - if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*(int64_t)mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) return ret; /* Start setting up the frame */ |