mirror of https://github.com/GNOME/gimp.git
validate size values read from files before using them to allocate memory.
2007-07-06 Mukund Sivaraman <muks@mukund.org> * plug-ins/common/sunras.c: validate size values read from files before using them to allocate memory. svn path=/trunk/; revision=22885
This commit is contained in:
parent
16970ab4f0
commit
2d6662cc95
|
@ -1,3 +1,8 @@
|
|||
2007-07-06 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/sunras.c: validate size values read from files
|
||||
before using them to allocate memory.
|
||||
|
||||
2007-07-06 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/psd-load.c: validate size values read from files
|
||||
|
|
|
@ -398,6 +398,11 @@ load_image (const gchar *filename)
|
|||
return (-1);
|
||||
}
|
||||
|
||||
if ((sunhdr.l_ras_maplength < 0) || (sunhdr.l_ras_maplength > (256 * 3)))
|
||||
{
|
||||
g_error ("Map lengths greater than 256 entries are unsupported by GIMP.");
|
||||
}
|
||||
|
||||
/* Is there a RGB colourmap ? */
|
||||
if ((sunhdr.l_ras_maptype == 1) && (sunhdr.l_ras_maplength > 0))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue