Ticket #28276: patch-ARB-glpng.diff
File patch-ARB-glpng.diff, 1.0 KB (added by matt.cottrell@…, 14 years ago) |
---|
-
GL/glpng/glpng.c
37 37 #include <math.h> 38 38 #include <png.h> 39 39 40 #if 0 41 #define PNG_CHECK_SIG(header,size) png_check_sig(header,size) // old libpng 42 #else 43 #define PNG_CHECK_SIG(header,size) (png_sig_cmp(header,0,size)==0) 44 #endif 45 40 46 /* Used to decide if GL/gl.h supports the paletted extension */ 41 47 #ifdef GL_COLOR_INDEX1_EXT 42 48 #define SUPPORTS_PALETTE_EXT … … 278 284 if (pinfo == NULL) return 0; 279 285 280 286 fread(header, 1, 8, fp); 281 if (! png_check_sig(header, 8)) return 0;287 if (!PNG_CHECK_SIG(header, 8)) return 0; 282 288 283 289 png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); 284 290 info = png_create_info_struct(png); … … 383 389 png_uint_32 i; 384 390 385 391 fread(header, 1, 8, fp); 386 if (! png_check_sig(header, 8)) return 0;392 if (!PNG_CHECK_SIG(header, 8)) return 0; 387 393 388 394 png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); 389 395 info = png_create_info_struct(png);