summaryrefslogtreecommitdiff
blob: 53c5b73284eaadc2db619787ea8150b0f98d8186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
http://repos.archlinux.org/wsvn/packages/emacs/trunk/libpng14.patch

--- emacs-22.3-orig/src/image.c
+++ emacs-22.3/src/image.c
@@ -6338,7 +6338,7 @@
 /* PNG library details.  */
 
 DEF_IMGLIB_FN (png_get_io_ptr);
-DEF_IMGLIB_FN (png_check_sig);
+DEF_IMGLIB_FN (png_sig_cmp);
 DEF_IMGLIB_FN (png_create_read_struct);
 DEF_IMGLIB_FN (png_create_info_struct);
 DEF_IMGLIB_FN (png_destroy_read_struct);
@@ -6369,7 +6369,7 @@
     return 0;
 
   LOAD_IMGLIB_FN (library, png_get_io_ptr);
-  LOAD_IMGLIB_FN (library, png_check_sig);
+  LOAD_IMGLIB_FN (library, png_sig_cmp);
   LOAD_IMGLIB_FN (library, png_create_read_struct);
   LOAD_IMGLIB_FN (library, png_create_info_struct);
   LOAD_IMGLIB_FN (library, png_destroy_read_struct);
@@ -6394,7 +6394,7 @@
 #else
 
 #define fn_png_get_io_ptr		png_get_io_ptr
-#define fn_png_check_sig		png_check_sig
+#define fn_png_sig_cmp			png_sig_cmp
 #define fn_png_create_read_struct	png_create_read_struct
 #define fn_png_create_info_struct	png_create_info_struct
 #define fn_png_destroy_read_struct	png_destroy_read_struct
@@ -6541,7 +6541,7 @@
 
       /* Check PNG signature.  */
       if (fread (sig, 1, sizeof sig, fp) != sizeof sig
-	  || !fn_png_check_sig (sig, sizeof sig))
+	  || fn_png_sig_cmp (sig, 0, sizeof sig))
 	{
 	  image_error ("Not a PNG file: `%s'", file, Qnil);
 	  UNGCPRO;
@@ -6558,7 +6558,7 @@
 
       /* Check PNG signature.  */
       if (tbr.len < sizeof sig
-	  || !fn_png_check_sig (tbr.bytes, sizeof sig))
+	  || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig))
 	{
 	  image_error ("Not a PNG image: `%s'", img->spec, Qnil);
 	  UNGCPRO;