diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-03 23:25:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-13 03:40:19 +0200 |
commit | 36126e4c142e43cc703f4b8c535d388ac5e403a4 (patch) | |
tree | d31d04a7412c4c477b9c1371aac41809456ca78b /libavcodec | |
parent | 73d6d9f1292424a09756c56b279b8764ef0befeb (diff) | |
download | ffmpeg-36126e4c142e43cc703f4b8c535d388ac5e403a4.tar.gz |
avcodec/exr: Fix preview overflow
Fixes: CID1515456 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/exr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 8bd39f78a4..4bac0be89b 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1943,7 +1943,7 @@ static int decode_header(EXRContext *s, AVFrame *frame) "preview", 16)) >= 0) { uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); - uint64_t psize = pw * ph; + uint64_t psize = pw * (uint64_t)ph; if (psize > INT64_MAX / 4) { ret = AVERROR_INVALIDDATA; goto fail; |