Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . xbubble (0.5.11.2-3.2) unstable; urgency=low . * Non-maintainer upload. * Fixes FTBFS: loadpng.c ignoring return value of fread (Closes: #664910). Author: Thomas Goirand Bug-Debian: http://bugs.debian.org/664910 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- xbubble-0.5.11.2.orig/src/loadpng.c +++ xbubble-0.5.11.2/src/loadpng.c @@ -80,7 +80,11 @@ unsigned char * load_png_file( const cha return NULL; } /* libpng does a longjmp here when it encounters an error */ +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + if ( setjmp(png_jmpbuf(png_ptr)) ) { +#else if ( setjmp( png_ptr->jmpbuf ) ) { +#endif png_destroy_read_struct( &png_ptr, &info_ptr, NULL); fclose(fd); return NULL; @@ -102,7 +106,11 @@ unsigned char * load_png_file( const cha png_set_gray_to_rgb(png_ptr); /* detect alpha layer */ +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + if ((png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) || +#else if (( info_ptr->color_type & PNG_COLOR_MASK_ALPHA )|| +#endif ( png_get_valid( png_ptr, info_ptr, PNG_INFO_tRNS ))) *has_alpha = 1; else