Commit cf12fd0d authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Always set an error when returning NULL. (453365, Michael Chudobiak)

2007-07-03  Matthias Clasen  <mclasen@redhat.com>

        * io-tiff.c (tiff_image_parse): Always set an error
        when returning NULL.  (453365, Michael Chudobiak)



svn path=/trunk/; revision=18365
parent 22fa07d5
2007-07-03 Matthias Clasen <mclasen@redhat.com>
* io-tiff.c (tiff_image_parse): Always set an error
when returning NULL. (453365, Michael Chudobiak)
2007-07-03 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Be
......
......@@ -199,8 +199,13 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
gint h = height;
(* context->size_func) (&w, &h, context->user_data);
if (w == 0 || h == 0)
if (w == 0 || h == 0) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Width or height of TIFF image is zero"));
return NULL;
}
}
pixels = g_try_malloc (bytes);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment