Commit e6a81811 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Pay attention to the libjpeg error code and report OOM errors as such.

2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* io-jpeg.c (fatal_error_handler): Pay attention to the
	libjpeg error code and report OOM errors as such.  (#312674,
	Tommi Komulainen)
parent 4b5f259b
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* io-jpeg.c (fatal_error_handler): Pay attention to the
libjpeg error code and report OOM errors as such. (#312674,
Tommi Komulainen)
2005-08-13 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.0 ===
......
......@@ -33,6 +33,7 @@
#include <string.h>
#include <setjmp.h>
#include <jpeglib.h>
#include <jerror.h>
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-io.h"
......@@ -110,7 +111,9 @@ fatal_error_handler (j_common_ptr cinfo)
if (errmgr->error && *errmgr->error == NULL) {
g_set_error (errmgr->error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
cinfo->err->msg_code == JERR_OUT_OF_MEMORY
? GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY
: GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Error interpreting JPEG image file (%s)"),
buffer);
}
......
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