X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fnuv.c;h=3ceaaac4e9dd79ca495c46b4e783ada95a9f4336;hb=e83717e63eab1f1b78dc0990e5b8e927097fca29;hp=7958000ae878287df876957bc65efeed8f728fcf;hpb=1ca978d6366f3c7d7df6b3d50566e892f8da605a;p=ffmpeg diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 7958000ae87..3ceaaac4e9d 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -126,7 +126,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, get_quant_quality(c, quality); if (width != c->width || height != c->height) { // also reserve space for a possible additional header - int buf_size = height * width * 3 / 2 + int64_t buf_size = height * (int64_t)width * 3 / 2 + FFMAX(AV_LZO_OUTPUT_PADDING, AV_INPUT_BUFFER_PADDING_SIZE) + RTJPEG_HEADER_SIZE; if (buf_size > INT_MAX/8)