avcodec/exr: Fix preview overflow
Fixes: CID1515456 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 36126e4c14)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
21249e8cbe
commit
cb03082cfa
1 changed files with 1 additions and 1 deletions
|
|
@ -1956,7 +1956,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue