Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37567256
en ru br
ALT Linux repos
S:3.4.2-alt2

Group :: Office
RPM: hp2xx

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: hp2xx-3.4.2-png-deprecated.patch
Download


Index: sources/png.c
===================================================================
--- sources/png.c.orig
+++ sources/png.c
@@ -4,6 +4,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <zlib.h>
 #include "to_png.h"
 #include <png.h>
 
@@ -38,7 +39,7 @@ void pdImagePNG(im, fd)
 	}
 
 	/* set up error handlimg for libpng */
-	if (setjmp(png_ptr->jmpbuf))
+	if (setjmp(png_jmpbuf(png_ptr)))
 	{    
 		png_destroy_write_struct(&png_ptr, &info_ptr);
 		return;
@@ -98,7 +99,7 @@ void pdImagePNG(im, fd)
 	png_write_end(png_ptr, info_ptr);
 
 	/* if you malloced the palette, free it here */
-	free(info_ptr->palette);
+	png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, -1);
 
 	/* if you allocated any text comments, free them here */
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin