safeguard to avoid crashes while loading corrupt PSD images. Fixes bug
2007-07-13 Raphael Quinet <raphael@gimp.org> * plug-ins/common/psd-load.c (load_image): safeguard to avoid crashes while loading corrupt PSD images. Fixes bug #327444. svn path=/trunk/; revision=22922
This commit is contained in:
parent
17446e30c1
commit
3f1949a340
2 changed files with 11 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2007-07-13 Raphaël Quinet <raphael@gimp.org>
|
||||
|
||||
* plug-ins/common/psd-load.c (load_image): safeguard to avoid
|
||||
crashes while loading corrupt PSD images. Fixes bug #327444.
|
||||
|
||||
2007-07-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/psd-load.c: use g_printerr() for debug output.
|
||||
|
|
|
|||
|
|
@ -2639,7 +2639,9 @@ load_image (const gchar *name)
|
|||
{
|
||||
gimp_progress_update (1.0);
|
||||
|
||||
xfread_interlaced (fd, dest, PSDheader.imgdatalen,
|
||||
xfread_interlaced (fd, dest, MIN (PSDheader.imgdatalen,
|
||||
step * PSDheader.columns
|
||||
* PSDheader.rows),
|
||||
"raw image data", step);
|
||||
}
|
||||
else
|
||||
|
|
@ -2647,7 +2649,9 @@ load_image (const gchar *name)
|
|||
gimp_progress_update (1.0);
|
||||
|
||||
cmykbuf = g_malloc (PSDheader.imgdatalen);
|
||||
xfread_interlaced (fd, cmykbuf, PSDheader.imgdatalen,
|
||||
xfread_interlaced (fd, cmykbuf, MIN (PSDheader.imgdatalen,
|
||||
step * PSDheader.columns
|
||||
* PSDheader.rows),
|
||||
"raw cmyk image data", step);
|
||||
|
||||
cmykp2rgb (cmykbuf, dest,
|
||||
|
|
|
|||
Loading…
Reference in a new issue