[libpng16] Renamed pnginflate to png-fix-too-far-back in contrib/tools.

This commit is contained in:
Glenn Randers-Pehrson 2013-05-08 21:57:00 -05:00
parent ff141eb21e
commit 4ea93e69bc
4 changed files with 14 additions and 11 deletions

View File

@ -73,6 +73,7 @@ Version 1.6.3beta05 [May 9, 2013]
both the correct libpng and the correct zlib to function correctly. both the correct libpng and the correct zlib to function correctly.
Check ZLIB_VERNUM for mismatches, enclose #error in quotes Check ZLIB_VERNUM for mismatches, enclose #error in quotes
Renamed contrib/tools/fixitxt to contrib/tools/png-fix-itxt. Renamed contrib/tools/fixitxt to contrib/tools/png-fix-itxt.
Renamed contrib/tools/pnginflate to contrib/tools/png-fix-too-far-back.
Added information in the documentation about problems with and fixes for Added information in the documentation about problems with and fixes for
the bad CRC and bad iTXt chunk situations. the bad CRC and bad iTXt chunk situations.

View File

@ -4556,6 +4556,7 @@ Version 1.6.3beta05 [May 9, 2013]
both the correct libpng and the correct zlib to function correctly. both the correct libpng and the correct zlib to function correctly.
Check ZLIB_VERNUM for mismatches, enclose #error in quotes Check ZLIB_VERNUM for mismatches, enclose #error in quotes
Renamed contrib/tools/fixitxt to contrib/tools/png-fix-itxt. Renamed contrib/tools/fixitxt to contrib/tools/png-fix-itxt.
Renamed contrib/tools/pnginflate to contrib/tools/png-fix-too-far-back.
Added information in the documentation about problems with and fixes for Added information in the documentation about problems with and fixes for
the bad CRC and bad iTXt chunk situations. the bad CRC and bad iTXt chunk situations.

View File

@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I scripts
check_PROGRAMS= pngtest pngunknown pngstest pngvalid check_PROGRAMS= pngtest pngunknown pngstest pngvalid
# Utilities - installed # Utilities - installed
bin_PROGRAMS= pngdeflate png-fix-itxt bin_PROGRAMS= png-fix-too-far-back png-fix-itxt
pngtest_SOURCES = pngtest.c pngtest_SOURCES = pngtest.c
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
@ -24,8 +24,8 @@ pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
pngunknown_SOURCES = contrib/libtests/pngunknown.c pngunknown_SOURCES = contrib/libtests/pngunknown.c
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
pngdeflate_SOURCES = contrib/tools/pngdeflate.c png_fix_too_far_back_SOURCES = contrib/tools/png-fix-too-far-back.c
pngdeflate_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la png_fix_too_far_back_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
@ -196,7 +196,7 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
# an installed one (this can happen immediately after on a clean system if # an installed one (this can happen immediately after on a clean system if
# 'make test' is the first thing the user does.) # 'make test' is the first thing the user does.)
pngstest.o pngvalid.o pngtest.o pngunknown.o timepng.o: pnglibconf.h pngstest.o pngvalid.o pngtest.o pngunknown.o timepng.o: pnglibconf.h
pngdeflate.o png-fix-itxt.o: pnglibconf.h png-fix-too-far-back.o png-fix-itxt.o: pnglibconf.h
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually # We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
# be built with PNG_USE_READ_MACROS; this prevents the read macros from # be built with PNG_USE_READ_MACROS; this prevents the read macros from

View File

@ -1,4 +1,4 @@
/* pngdeflate.c /* png-fix-too-far-back.c
* *
* Copyright (c) 2013 John Cunningham Bowler * Copyright (c) 2013 John Cunningham Bowler
* *
@ -8,7 +8,7 @@
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
* *
* Tool to check and fix the deflate 'too far back' problem, see the usage * Tool to check and fix the zlib inflate 'too far back' problem, see the usage
* message for more information. * message for more information.
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -26,14 +26,14 @@
#endif #endif
#if PNG_LIBPNG_VER < 10603 /* 1.6.3 */ #if PNG_LIBPNG_VER < 10603 /* 1.6.3 */
# error "pngdeflate will not work with libpng versions prior to 1.6.3" # error "png-fix-too-far-back will not work with libpng prior to 1.6.3"
#endif #endif
#ifdef PNG_READ_SUPPORTED #ifdef PNG_READ_SUPPORTED
#include <zlib.h> #include <zlib.h>
#ifndef PNG_MAXIMUM_INFLATE_WINDOW #ifndef PNG_MAXIMUM_INFLATE_WINDOW
# error "pngdeflate not supported in this libpng version" # error "png-fix-too-far-back not supported in this libpng version"
#endif #endif
#if PNG_ZLIB_VERNUM >= 0x1240 #if PNG_ZLIB_VERNUM >= 0x1240
@ -592,7 +592,7 @@ fix_one(FILE *fp, FILE *fpIn, IDAT_info *info, png_uint_32 max_IDAT, int strip)
rx(fpIn, &b, 1); rx(fpIn, &b, 1);
--len; --len;
/* Do this 1 byte at a time to maximize the chance of /* Do this 1 byte at a time to guarantee
* detecting errors (in particular zlib can skip the * detecting errors (in particular zlib can skip the
* 'too-far-back' error if the output buffer is bigger than * 'too-far-back' error if the output buffer is bigger than
* the window size.) * the window size.)
@ -1172,7 +1172,8 @@ main(int argc, const char **argv)
int int
main(void) main(void)
{ {
fprintf(stderr, "pngdeflate needs libpng with a zlib >=1.2.4 (not 0x%x)\n", fprintf(stderr,
"png-fix-too-far-back needs libpng with a zlib >=1.2.4 (not 0x%x)\n",
PNG_ZLIB_VERNUM); PNG_ZLIB_VERNUM);
return 77; return 77;
} }
@ -1183,7 +1184,7 @@ main(void)
int int
main(void) main(void)
{ {
fprintf(stderr, "pngdeflate does not work without read support\n"); fprintf(stderr, "png-fix-too-far-back does not work without read support\n");
return 77; return 77;
} }
#endif /* PNG_READ_SUPPORTED */ #endif /* PNG_READ_SUPPORTED */