1 diff -ur pdflib-4.0.3.orig/pdflib/p_png.c pdflib-4.0.3/pdflib/p_png.c
2 --- pdflib-4.0.3.orig/pdflib/p_png.c 2002-01-26 19:32:18.000000000 +0100
3 +++ pdflib-4.0.3/pdflib/p_png.c 2010-03-01 10:44:56.537284868 +0100
5 return -1; /* Couldn't open PNG file */
8 - if (fread(sig, 1, 8, image->fp) == 0 || !png_check_sig(sig, 8)) {
9 + if (fread(sig, 1, 8, image->fp) == 0 || !png_sig_cmp(sig, 0, 8)) {
11 png_destroy_read_struct(&image->info.png.png_ptr,
12 &image->info.png.info_ptr, NULL);
13 diff -ur pdflib-4.0.3.orig/png/png.c pdflib-4.0.3/png/png.c
14 --- pdflib-4.0.3.orig/png/png.c 2001-03-21 17:12:07.000000000 +0100
15 +++ pdflib-4.0.3/png/png.c 2010-03-01 10:45:38.760604885 +0100
17 return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
20 -/* (Obsolete) function to check signature bytes. It does not allow one
21 - * to check a partial signature. This function might be removed in the
22 - * future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG.
25 -png_check_sig(png_bytep sig, int num)
27 - return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
30 /* Function to allocate memory for zlib and clear it to 0. */
32 png_zalloc(voidpf png_ptr, uInt items, uInt size)
33 diff -ur pdflib-4.0.3.orig/png/pngconf.h pdflib-4.0.3/png/pngconf.h
34 --- pdflib-4.0.3.orig/png/pngconf.h 2002-03-25 17:06:09.000000000 +0100
35 +++ pdflib-4.0.3/png/pngconf.h 2010-03-01 10:45:07.647274500 +0100
37 #define png_bKGD pdf_png_bKGD
38 #define png_cHRM pdf_png_cHRM
39 #define png_calculate_crc pdf_png_calculate_crc
40 -#define png_check_sig pdf_png_check_sig
41 #define png_convert_to_rfc1123 pdf_png_convert_to_rfc1123
42 #define png_create_info_struct pdf_png_create_info_struct
43 #define png_data_freer pdf_png_data_freer
44 diff -ur pdflib-4.0.3.orig/png/png.h pdflib-4.0.3/png/png.h
45 --- pdflib-4.0.3.orig/png/png.h 2001-03-21 17:12:07.000000000 +0100
46 +++ pdflib-4.0.3/png/png.h 2010-03-01 10:45:25.460606752 +0100
47 @@ -1181,11 +1181,6 @@
48 extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
49 png_size_t num_to_check));
51 -/* Simple signature checking function. This is the same as calling
52 - * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
54 -extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num));
56 /* Allocate and initialize png_ptr struct for reading, and any other memory. */
57 extern PNG_EXPORT(png_structp,png_create_read_struct)
58 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,