[libpng16] Renamed pnginflate to png-fix-too-far-back in contrib/tools.
This commit is contained in:
parent
ff141eb21e
commit
4ea93e69bc
1
ANNOUNCE
1
ANNOUNCE
@ -73,6 +73,7 @@ Version 1.6.3beta05 [May 9, 2013]
|
||||
both the correct libpng and the correct zlib to function correctly.
|
||||
Check ZLIB_VERNUM for mismatches, enclose #error in quotes
|
||||
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
|
||||
the bad CRC and bad iTXt chunk situations.
|
||||
|
||||
|
1
CHANGES
1
CHANGES
@ -4556,6 +4556,7 @@ Version 1.6.3beta05 [May 9, 2013]
|
||||
both the correct libpng and the correct zlib to function correctly.
|
||||
Check ZLIB_VERNUM for mismatches, enclose #error in quotes
|
||||
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
|
||||
the bad CRC and bad iTXt chunk situations.
|
||||
|
||||
|
@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I scripts
|
||||
check_PROGRAMS= pngtest pngunknown pngstest pngvalid
|
||||
|
||||
# Utilities - installed
|
||||
bin_PROGRAMS= pngdeflate png-fix-itxt
|
||||
bin_PROGRAMS= png-fix-too-far-back png-fix-itxt
|
||||
|
||||
pngtest_SOURCES = pngtest.c
|
||||
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_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
|
||||
pngdeflate_SOURCES = contrib/tools/pngdeflate.c
|
||||
pngdeflate_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
png_fix_too_far_back_SOURCES = contrib/tools/png-fix-too-far-back.c
|
||||
png_fix_too_far_back_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
|
||||
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
|
||||
# 'make test' is the first thing the user does.)
|
||||
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
|
||||
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* pngdeflate.c
|
||||
/* png-fix-too-far-back.c
|
||||
*
|
||||
* Copyright (c) 2013 John Cunningham Bowler
|
||||
*
|
||||
@ -8,7 +8,7 @@
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* 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.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
@ -26,14 +26,14 @@
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
#include <zlib.h>
|
||||
|
||||
#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
|
||||
|
||||
#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);
|
||||
--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
|
||||
* 'too-far-back' error if the output buffer is bigger than
|
||||
* the window size.)
|
||||
@ -1172,7 +1172,8 @@ main(int argc, const char **argv)
|
||||
int
|
||||
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);
|
||||
return 77;
|
||||
}
|
||||
@ -1183,7 +1184,7 @@ main(void)
|
||||
int
|
||||
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;
|
||||
}
|
||||
#endif /* PNG_READ_SUPPORTED */
|
Loading…
Reference in New Issue
Block a user