[gtk+] Bug 592901 - Crash in JPEG pixbuf loader instead of error
- From: Christian Dywan <cdywan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Bug 592901 - Crash in JPEG pixbuf loader instead of error
- Date: Tue, 25 Aug 2009 10:02:25 +0000 (UTC)
commit c91cb2f71a33445fa3d8cf8da214cdc0212918ed
Author: Christian Dywan <christian lanedo com>
Date: Tue Aug 25 11:58:30 2009 +0200
Bug 592901 - Crash in JPEG pixbuf loader instead of error
Initialize the error structure early enough to ensure that it
propagates properly in the case of an error. Patch by Nokia.
gdk-pixbuf/io-jpeg.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index cf8c9ed..680a209 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -468,7 +468,6 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
cinfo.err = jpeg_std_error (&jerr.pub);
jerr.pub.error_exit = fatal_error_handler;
jerr.pub.output_message = output_message_handler;
-
jerr.error = error;
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
@@ -1190,11 +1189,11 @@ real_save_jpeg (GdkPixbuf *pixbuf,
}
/* set up error handling */
+ cinfo.err = jpeg_std_error (&(jerr.pub));
jerr.pub.error_exit = fatal_error_handler;
jerr.pub.output_message = output_message_handler;
jerr.error = error;
- cinfo.err = jpeg_std_error (&(jerr.pub));
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
jpeg_destroy_compress (&cinfo);
g_free (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]