Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
Update libtiff to v4.0.4
  • Loading branch information
dmsck committed Jul 5, 2015
2 parents ab6fe3e + db68a5a commit c8e38c3
Show file tree
Hide file tree
Showing 147 changed files with 2,852 additions and 1,585 deletions.
282 changes: 282 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,285 @@
2015-06-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff 4.0.4 released.

* configure.ac: Add a HAVE_FOO Automake conditional for each
add-on library.

* test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode
requires JPEG support to compile. Use Automake conditional to
only include it when JPEG support is available.

* html/build.html: Try to improve the nmake-based VC++ build
description.

* libtiff/tiffconf.vc.h: Build fixes based on testing.

* libtiff/tif_config.vc.h: Build fixes based on testing.

* libtiff/libtiff.def: TIFFRasterScanline does not exist so remove
export for it.

2015-06-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_config.vc.h: Make adjustments to match the new
definitions that configure produces, including for WIN64. Still
needs to be tested.

* configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting
specifier. 64-bit MinGW supports 'long long' but support for
'lld' is not assured by the run-time DLLs and so GCC warns.
Add TIFF_SIZE_T and TIFF_SIZE_FORMAT to provide a type definition
and printf format specifier to deal with printing values of
'size_t' type. In particular, this was necessary for WIN64.
Added a configure test for if the system headers provide 'optarg'
(normal case) and block out the many explicit 'extern' statements
in the utilities. This was found to be necessary under Windows
when getopt is in a DLL and the symbols are already imported with
dllimport via standard header files.

* test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32
and boolean in MinGW build due to including jpeglib.h.

* test/rewrite_tag.c (main): Fix problem with location of variable
declaration.

* libtiff/libtiff.def: Added exports for TIFFGetConfiguredCODECs,
TIFFReadRGBAImageOriented, TIFFSetCompressionScheme,
TIFFSwabArrayOfTriples, TIFFVGetFieldDefaulted, _TIFFCheckRealloc,
TIFFRasterScanline, TIFFSetErrorHandlerExt,
TIFFSetWarningHandlerExt, TIFFNumberOfDirectories,
TIFFCreateCustomDirectory, TIFFCreateEXIFDirectory,
TIFFWriteCustomDirectory, _TIFFRewriteField as recommended by
Roger Leigh and justified by use in libtiff tests, documentation,
and changelog notes. Also sorted symbol list and removed
duplicate entries.

2015-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_getimage.c: Fix four Coverity issues related to
unintended sign extension.

2015-06-16 Even Rouault <even.rouault at spatialys.com>

* libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna)

2015-06-14 Lee Howard <faxguy@howardsilvan.com>

* libtiff/tif_unix.c: contribution from Vadim Zeitlin on
Bugzilla Bug #2510 fixes several harmless but still annoying
warnings

* configure: contribution from Ludolf Holzheid on Bugzilla
Bug #2498. Adds an option to select the file I/O style on
Windows hosts.

* libtiff/tif_getimage.c: contribution from Gary Cramblitt
on Bugzilla Bug #2409. Correct reading of certain tiled TIFFs.

* configure, configure.ac: contribution from Marcos H. Woehrmann
on Bugzilla Bug #2405. Correct shell equality operator.

* tools/tiffgt.c (raster_draw): contribution from Jay Berkenbilt
on Bugzilla Bug #2401. Appropriately call glFlush().

* tools/tiff2pdf.c: change ColorTransform from "0" to "1"
following Bugzilla Bug #2150.

2015-06-13 Lee Howard <faxguy@howardsilvan.com>

* libtiff/tif_lzw.c: contribution from Andy Cave - decode
files that contain consecutive CODE_CLEAR codes.

* tools/tiff2pdf.c: contribution from Antti S. Lankila on
Bugzilla Bug #2078. Suppress initial output of the header.

* tools/tiff2pdf.c: contribution from Yuriy M. Kaminskiy -
Take care in using the return value from snprintf().

* tools/tiffcrop.c: contribution from Eduardo Robles Elvira -
correctly copy the compression tag from the source TIFF.

* tools/tiff2ps.c: contribution from Eduardo Robles Elvira -
correct sizing and scaling problems with output document.

2015-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_jpeg.c (JPEGDecode): Split JPEGDecode() into two
clean implementations in order to avoid pre-processor hell. Only
one of the implementations is used in a given build.

2015-06-08 Even Rouault <even.rouault at spatialys.com>

* libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12
case

2015-06-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975
"Division or modulo by zero".
(TIFFWriteEncodedTile): Fix Coverity 715976 and 715977 "Division
or modulo by zero".
(TIFFWriteRawStrip): Fix Coverity 715978 "Division or modulo by
zero".
(TIFFWriteScanline): Fix Coverity 715979 "Division or modulo by
zero".

* libtiff/tif_read.c (TIFFStartTile): Fix Coverity 715973 and
715974 "Division or modulo by zero".

2015-05-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_dir.c (TIFFNumberOfDirectories): Quiet Coverity
1134470 "Logically dead code" by making the roll-over check
explicit.

* libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227
"Division or modulo by zero".
(LogLuvDecodeStrip): Fix Coverity 991239 "Division or modulo by
zero".
(LogLuvEncodeStrip): Fix Coverity 991240 "Division or modulo by
zero".
(LogLuvEncodeTile): Fix Coverity 991241 "Division or modulo by
zero".

* libtiff/tif_dirread.c (TIFFReadDirEntryDoubleArray): Fix
Coverity 298626 "Logically dead code".
(TIFFReadDirEntryFloatArray): Fix Coverity 298627 "Logically dead
code".
(TIFFReadDirEntryIfd8Array): Fix Coverity 298628 "Logically dead
code".
(TIFFReadDirEntrySlong8Array): Fix Coverity 298629 "Logically dead
code"

* libtiff/tif_dir.c (TIFFNumberOfDirectories): Don't depend on ++
operator precedenc in evaluation. Might quench Coverity 1134470
"Logically dead code".

* libtiff/tif_jpeg.c (JPEGDecode): Fix Coverity 602597 "Operands
don't affect result". This change uses ifdefs to include
applicable code based on properties of libjpeg. Still needs to be
re-tested with 12-bit "6b" and "MK1".

2015-05-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* libtiff/tif_dirwrite.c (_TIFFRewriteField): Fix Coverity 1024310
"Resource leak".

* libtiff/tif_ojpeg.c (OJPEGReadHeaderInfoSecStreamDht): Fix
Coverity 601720 "Resource leak".

* libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624
"Dereference before null check".

* libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400
"Missing break in switch".

* contrib/addtiffo/tif_overview.c (TIFF_DownSample): Check buffer
size calculation for overflow.

* contrib/addtiffo/addtiffo.c (main): Possibly address Coverity
1024226 "Untrusted value as argument".

* tools/gif2tiff.c (readgifimage): Fix Coverity 1024222 "Untrusted
value as argument".
(checksignature): Fix Coverity 1024894 "Ignoring number of bytes
read".
(readextension): Fix Coverity 1024893 "Ignoring number of bytes
read".
(readgifimage): Fix Coverity 1024890 "Ignoring number of bytes
read".
(readraster): Fix Coverity 1024891 "Ignoring number of bytes
read".
(readgifimage): Fix Coverity 1024892 "Ignoring number of bytes
read".

* tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 1024181
"Structurally dead code".

* tools/raw2tiff.c (main): Fix Coverity 1024887 "Unchecked return
value from library".
(guessSize): Fix Coverity 1024888 "Unchecked return value from
library".
(guessSize): Fix Coverity 1214162 "Ignoring number of bytes read".
(guessSize): Fix Coverity 1024889 "Unchecked return value from
library".

* tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 298621
"Resource leak".
(t2p_readwrite_pdf_image): Fix Coverity 1024181 "Structurally dead
code".
(t2p_write_pdf): Fix Coverity 1227690 "Unused value".

2015-05-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* contrib/iptcutil/iptcutil.c (formatIPTC): Fix Coverity 1024468
"Infinite loop".
(formatIPTC): Fix Coverity 1024727 "Truncated stdio return value".
(formatIPTC): Fix Coverity 1214240 "Untrusted loop bound".

2015-05-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix
Coverity 298615 "Resource leak".
(TIFFGetOvrBlock): Fix Coverity 1024649 "Unintended sign
extension".

* tools/bmp2tiff.c (main): Fix Coverity 1024225 "Untrusted value
as argument".
(main): Fix Coverity 1024678 "Unchecked return value from
library".
(main): Fix Coverity 1024679 "Unchecked return value from
library".
(main): Fix Coverity 1214160 "Ignoring number of bytes read".

* contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix
Coverity 298615 "Resource leak".

* tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309
"Resource leak".

* tools/tiffsplit.c (cpTiles): Fix Coverity 1024304 "Resource
leak".
(cpStrips): Fix Coverity 1024305 "Resource leak".

2015-05-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

* tools/ras2tiff.c: Fix Sun Raster header definition to be safe
for 64-bit systems. Add some header validations. Should fix many
Coverity issues.
(main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)".
(main): Quiet Coverity 1024223 "Untrusted value as argument".

* tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting
level does not match indentation".
(get_histogram): Quiet Coverity 1024386 "Out-of-bounds read".
This was a benign mis-diagnosis but added code to enforce against
buffer overflow.

* tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical
vs. bitwise operator".
(readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or
modulo by zero".
(readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead
code".
(writeSingleSection): Fix Coverity 1024796 "Nesting level does not
match indentation".
(writeCroppedImage): Fix Coverity 1024797 "Nesting level does not
match indentation".
(loadImage): Fix Coverity 1299741 "Dereference before null check".
(loadImage): Fix Coverity 1299740 "Out-of-bounds write".

2015-03-02 Even Rouault <even.rouault@spatialys.com>

* tools/tiffdither.c: check memory allocations to avoid writing to
NULL pointer. Also check multiplication overflow. Fixes #2501,
CVE-2014-8128. Derived from patch by Petr Gajdos.

2015-01-26 Even Rouault <even.rouault@spatialys.com>

* add html/v4.0.4beta.html under version control
* HOWTO-RELEASE: write that cvs add html/vX.X.html must be used

2015-01-26 Even Rouault <even.rouault@spatialys.com>

* libtiff 4.0.4beta released
Expand Down
3 changes: 2 additions & 1 deletion HOWTO-RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Notes on releasing.

1. Commit any unsaved changes.

2. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
2. Create html/vX.X.html and add it to cvs with 'cvs add html/vX.X.html'.
Take ChangeLog entries and html-ify in there.
Easist thing to do is take html/vX.(X-1).html and use it as a template.
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.

Expand Down
5 changes: 2 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \
$(top_srcdir)/config/missing \
$(top_srcdir)/config/mkinstalldirs ChangeLog README TODO \
config/compile config/config.guess config/config.sub \
config/install-sh config/ltmain.sh config/missing \
config/mkinstalldirs
config/depcomp config/install-sh config/ltmain.sh \
config/missing config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
Expand Down Expand Up @@ -325,7 +325,6 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
Expand Down
2 changes: 1 addition & 1 deletion Makefile.vc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Makefile.vc,v 1.7 2008-01-01 15:53:10 fwarmerdam Exp $
# $Id: Makefile.vc,v 1.7 2008/01/01 15:53:10 fwarmerdam Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
Expand Down
2 changes: 1 addition & 1 deletion RELEASE-DATE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20150126
20150621
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: SConstruct,v 1.4 2007-02-24 15:03:47 dron Exp $
# $Id: SConstruct,v 1.4 2007/02/24 15:03:47 dron Exp $

# Tag Image File Format (TIFF) Software
#
Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Header: /cvs/maptools/cvsroot/libtiff/TODO,v 1.6 2002-10-10 05:28:43 warmerda Exp $
# $Header: /cvs/libtiff/TODO,v 1.6 2002/10/10 05:28:43 warmerda Exp $

o gif2tiff segaulting on selected images
o tiffcmp read data by strip/tile instead of scanline
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.4beta
4.0.4
1 change: 0 additions & 1 deletion build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
Expand Down
Loading

0 comments on commit c8e38c3

Please sign in to comment.