mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
gifdec: check that w,h is not zero
Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a0d1440476
commit
286930d302
@ -187,6 +187,8 @@ static int gif_read_image(GifState *s)
|
||||
if (left + width > s->screen_width ||
|
||||
top + height > s->screen_height)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (width <= 0 || height <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
/* process disposal method */
|
||||
if (s->gce_prev_disposal == GCE_DISPOSAL_BACKGROUND) {
|
||||
|
Loading…
Reference in New Issue
Block a user