mirror of https://github.com/GNOME/gimp.git
plug-ins: fix possible overflow in computation
FLI/FLC width x height is 16-bit unsigned, so theoretically it could overflow a 32-bit signed int. We fix this by making it a 64-bit signed int.
This commit is contained in:
parent
862c54ec94
commit
b6d5707816
|
@ -393,7 +393,8 @@ fli_read_frame (FILE *f,
|
|||
}
|
||||
if (fli_frame.chunks == 0)
|
||||
{
|
||||
memcpy (framebuf, old_framebuf, fli_header->width * fli_header->height);
|
||||
/* Silence a warning: wxh could in theory be more than INT_MAX. */
|
||||
memcpy (framebuf, old_framebuf, (gint64) fli_header->width * fli_header->height);
|
||||
}
|
||||
}
|
||||
else /* unknown, skip */
|
||||
|
|
Loading…
Reference in New Issue