mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-06 18:00:17 +00:00
avformat/icodec: fix integer overflow with nb_pal
Fixes: runtime error: signed integer overflow
Fixes: 42536949/clusterfuzz-testcase-minimized-fuzzer_loadfile-6199846684393472
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Tested-by: Kacper Michajlow
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 84569b6c22)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fdbb383a5d
commit
deecfb797b
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
AV_WL32(buf + 32, image->nb_pal);
|
||||
}
|
||||
|
||||
if (image->nb_pal > INT_MAX / 4 - 14 - 40)
|
||||
if (image->nb_pal > INT_MAX / 4 - 14 - 40U)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
AV_WL32(buf - 4, 14 + 40 + image->nb_pal * 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue