[gdk-pixbuf] Set up a jmp target in begin_load too
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Set up a jmp target in begin_load too
- Date: Wed, 30 Mar 2011 06:43:58 +0000 (UTC)
commit 3645ce712e1c41a7a800585a366402776b2fe1bf
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 30 02:41:46 2011 -0400
Set up a jmp target in begin_load too
This needs to be done before calling into libjpeg to catch
errors coming out of jpeg_create_decompress. Patch by
Craig Schlenter,
http://bugzilla.gnome.org/show_bug.cgi?id=636138
gdk-pixbuf/io-jpeg.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index c41914d..8560c94 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -662,6 +662,13 @@ gdk_pixbuf__jpeg_image_begin_load (GdkPixbufModuleSizeFunc size_func,
context->jerr.pub.output_message = output_message_handler;
context->jerr.error = error;
+ if (sigsetjmp (context->jerr.setjmp_buffer, 1)) {
+ jpeg_destroy_decompress (&context->cinfo);
+ g_free(context);
+ /* error should have been set by fatal_error_handler () */
+ return NULL;
+ }
+
/* create libjpeg structures */
jpeg_create_decompress (&context->cinfo);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]