diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index a6945549bd..59013ada49 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -262,7 +262,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, break; case AV_PIX_FMT_GBRPF32: if (!s->half) { - if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream) + if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream) return AVERROR_INVALIDDATA; scale = 1.f / s->scale; if (s->endian) {