avcodec/libxvid: fix potential integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/head
Michael Niedermayer 10 years ago
parent dfffc4aadc
commit e00499eb4c
  1. 2
      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 */

Loading…
Cancel
Save