2007-02-07 Chris Wilson <chris@chris-wilson.co.uk>
* io-jpeg.c: (gdk_pixbuf__jpeg_image_load),
(gdk_pixbuf__jpeg_image_load_increment): Set the GError
if the image is zero length. (#405327)
svn path=/trunk/; revision=17272
+2007-02-07 Chris Wilson <chris@chris-wilson.co.uk>
+
+ * io-jpeg.c: (gdk_pixbuf__jpeg_image_load),
+ (gdk_pixbuf__jpeg_image_load_increment): Set the GError
+ if the image is zero length. (#405327)
+
2007-02-06 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Protect
g_object_unref (pixbuf);
jpeg_destroy_decompress (&cinfo);
+
+ /* error should have been set by fatal_error_handler () */
return NULL;
}
height = cinfo->image_height;
if (context->size_func) {
(* context->size_func) (&width, &height, context->user_data);
- if (width == 0 || height == 0)
+ if (width == 0 || height == 0) {
+ g_set_error (error,
+ GDK_PIXBUF_ERROR,
+ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ _("Transformed JPEG has zero width or height."));
return FALSE;
+ }
}
for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {