aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-05-11 21:04:00 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-05-19 22:14:37 +0200
commit4c725df059dd9a5f2071e204924105b3ceb74cbc (patch)
tree4c1164bf1b6e0e7f9cdd297e497ca143087c48eb
parent6a9302739f5b20791eac7f40d9d999f822227fd1 (diff)
downloadffmpeg-4c725df059dd9a5f2071e204924105b3ceb74cbc.tar.gz
avcodec/mpeg12dec: Use 64bit in bit computation
I dont think this can actually overflow but 64bit seems reasonable to use Fixes: CID1521983 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mpeg12dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index a9fe3503db..9fd765f030 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2734,7 +2734,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame,
int ret;
// Check for minimal intra MB size (considering mb header, luma & chroma dc VLC, ac EOB VLC)
- if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2 + 3*4 + 2*2 + 2*6))
+ if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2LL + 3*4 + 2*2 + 2*6))
return AVERROR_INVALIDDATA;
ret = ff_get_buffer(avctx, frame, 0);