From 5c16742258c370b66df65a47427ab8d6b5e1d3a0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 29 Mar 2002 21:40:01 +0000 Subject: [PATCH] libpng error handlers must not return to their callers, thus longjmp out. * io-png.c (png_simple_error_callback): libpng error handlers must not return to their callers, thus longjmp out. This prevents annoying stderr output from the default error handler. --- gdk-pixbuf/ChangeLog | 6 ++++++ gdk-pixbuf/io-png.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index c8e6183bdd..36ec6b35c7 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,9 @@ +2002-03-29 Matthias Clasen + + * io-png.c (png_simple_error_callback): libpng error handlers must + not return to their callers, thus longjmp out. This prevents + annoying stderr output from the default error handler. + 2002-03-27 Matthias Clasen * io-png.c (gdk_pixbuf__png_image_stop_load): Don't leak info_ptr. diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index 66f99fdfe1..8111cacc0d 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -183,6 +183,8 @@ png_simple_error_callback(png_structp png_save_ptr, _("Fatal error in PNG image file: %s"), error_msg); } + + longjmp (png_save_ptr->jmpbuf, 1); } static void