Commit Graph

2799 Commits

Author SHA1 Message Date
Even Rouault
2794a67c27 * libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised
by GCC 6 -Wmisleading-indentation
2016-01-03 10:01:25 +00:00
Even Rouault
62382d0653 * libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL
string to %s formatter, which is undefined behaviour in sprintf().
2015-12-27 20:14:11 +00:00
Even Rouault
7dfc35c299 Fix MSVC breakage in previous commit 2015-12-27 17:14:52 +00:00
Even Rouault
a1506aa413 * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
(bugzilla #2508)
2015-12-27 16:55:20 +00:00
Even Rouault
13963114dd * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
functions in non debug builds by replacing assert()s by regular if
checks (bugzilla #2522).
Fix potential out-of-bound reads in case of short input data.
2015-12-27 16:25:11 +00:00
Even Rouault
b7cc3e5902 * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
interface in case of unsupported values of SamplesPerPixel/ExtraSamples
for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
CVE-2015-8683 reported by zzf of Alibaba.
2015-12-26 17:32:03 +00:00
Even Rouault
212816f6e4 * libtiff/tif_dirread.c: workaround false positive warning of Clang Static
Analyzer about null pointer dereference in TIFFCheckDirOffset().
2015-12-20 23:18:51 +00:00
Even Rouault
a292bc2d27 * libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found
by Clang Static Analyzer
2015-12-19 21:50:51 +00:00
Even Rouault
22ee4bcd8d offsets on a even offset (affects BigTIFF). This was a regression of the
changeset of 2015-10-19.
2015-12-18 14:08:11 +00:00
Even Rouault
56ae8c1ee3 * libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in
TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory
offsets on a even offset (affects BigTIFF)
2015-12-18 11:11:00 +00:00
Even Rouault
845ee2f85b * libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile()
should return -1 in case of failure of tif_encodestrip() as documented
* libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of
failure so that the above mentionned functions detect the error.
2015-12-12 18:04:26 +00:00
Even Rouault
b452d9b91c * libtiff/uvcode.h: const'ify uv_code array 2015-12-07 00:12:33 +00:00
Even Rouault
5b64b34dc9 * libtiff/tif_dirinfo.c: const'ify tiffFields, exifFields,
tiffFieldArray and exifFieldArray arrays
2015-12-06 23:51:44 +00:00
Even Rouault
fdda780a4b * libtiff/tif_print.c: constify photoNames and orientNames arrays 2015-12-06 22:19:56 +00:00
Even Rouault
e4df80bf75 * libtiff/tif_close.c, libtiff/tif_extension.c : rename link
variable to avoid -Wshadow warnings
2015-12-06 11:13:43 +00:00
Even Rouault
142a8a8d4e * libtiff/tif_close.c: rename variable to avoid -Wshadow warning 2015-12-06 10:51:14 +00:00
Even Rouault
f238db387f * libtiff/*.c: fix typos in comments (patch by Kurt Schwehr) 2015-11-22 22:37:27 +00:00
Even Rouault
3ba1a57e00 tif_ojpec.c: modify previous change to be compatible with all MSVC versions 2015-11-22 16:40:43 +00:00
Even Rouault
1c9ef8f17c * libtiff/*.c: fix MSVC warnings related to cast shortening and
assignment within conditional expression
2015-11-22 15:31:03 +00:00
Even Rouault
87f02eaced * libtiff/*.c: fix clang -Wshorten-64-to-32 warnings 2015-11-18 20:35:07 +00:00
Even Rouault
7cf3e7efeb * libtiff/tif_dirread.c: initialize double* data at line 3693 to NULL
to please MSVC 2013
2015-11-18 18:26:03 +00:00
Even Rouault
1dacfe503f Fix previous commit 2015-11-17 16:21:02 +00:00
Even Rouault
1784d0edf7 * libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction
if BitsPerPixel > 24, so as to avoid huge memory allocation and file
read attempts
2015-11-17 12:17:31 +00:00
Even Rouault
d91cba049c * libtiff/tif_dirread.c: remove duplicated assignment (reported by
Clang static analyzer)
2015-11-02 09:52:08 +00:00
Even Rouault
1874d4e8c8 * libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c,
libtiff/tif_jpeg_12.c: suppress warnings about 'no previous
declaration/prototype'
2015-10-28 19:10:20 +00:00
Even Rouault
aefadd720c * libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix
'warning: negative integer implicitly converted to unsigned type' warning
(part of -Wconversion)
2015-10-19 12:04:23 +00:00
Even Rouault
ecc78ef4c1 * libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c,
libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/)
2015-10-17 10:13:14 +00:00
Bob Friesenhahn
5612707c08 Fix failure to update libtiff version in AC_INIT. 2015-09-12 19:50:39 +00:00
Bob Friesenhahn
20dc498028 * libtiff 4.0.6 released. 2015-09-12 19:46:23 +00:00
Bob Friesenhahn
e2f860d2f4 * html/v4.0.6.html: Added release notes for 4.0.6. 2015-09-12 19:29:47 +00:00
Bob Friesenhahn
d1fabc4db1 * tools/tiffgt.c: Silence glut API deprecation warnings on MacOS
X.  Patch by Roger Leigh.
2015-09-06 20:42:20 +00:00
Bob Friesenhahn
897af013fb * Makefile.am: Added a 'coverity' rule to assist with Coverity
submissions.
2015-09-06 19:34:06 +00:00
Bob Friesenhahn
7bc7b77e78 * tools/tiff2pdf.c: Fix compiler warning about unused function
when JPEG is not available.

* tools/fax2ps.c (main): Detect failure to write to temporary
file.
2015-09-06 18:24:27 +00:00
Bob Friesenhahn
2c7bbbc163 (TIFF_UINT32_MAX): Avoid use of platform-specific large constants. 2015-09-05 20:31:41 +00:00
Bob Friesenhahn
6fcb0cfb03 (TIFF_INT64_MAX): Avoid use of platform-specific large constants. 2015-09-05 20:22:45 +00:00
Bob Friesenhahn
54de96d2b8 * libtiff/tif_dirread.c (TIFFReadDirEntryCheckRangeSlongSlong8):
Change implementation so that it does not sometimes overflow the
range of a 32-bit int and to avoid a signed vs unsigned compare
compiler warning.
2015-09-05 20:15:57 +00:00
Bob Friesenhahn
878815a1f0 Missed BSD make patch due to wrong patch order. 2015-09-01 21:15:52 +00:00
Bob Friesenhahn
a9afad2a9f * Makefile.am (distcheck-hook), configure.ac: Applied patches by
Roger Leigh (via tiff mailing list on 2015-09-01) to fix issue
with BSD make and to make use of cmake in 'distcheck' target
conditional on if cmake is available.
2015-09-01 19:23:16 +00:00
Bob Friesenhahn
e762ba3de9 * CMakeLists.txt, Makefile.am, configure.ac: Applied patches by
Roger Leigh (via tiff mailing list on 2015-09-01).

CMake build is now included in 'distcheck' target.

Builds with CMake 2.8.9 and newer.

Tar is now resquested to use POSIX PAX format.
2015-09-01 15:38:01 +00:00
Bob Friesenhahn
ba57d5f0b7 * CMakeLists.txt, libtiff/test/Makefile.am: Applied patches by
Roger Leigh (via tiff mailing list on 2015-08-31.

CMake reads all version information directly from configure.ac to
avoid duplication of values.  This basically greps over the file
for the LIBTIFF_* variables, then translates them to the form
needed for cmake. This includes the release version and libtool
shared library version information.

Make shared/static library building configurable.  Currently it
always builds shared libraries, with static libs having a _static
suffix (copying zlib, but it means it's got a non-standard name).
CMake has a -DBUILD_SHARED_LIBS=ON|OFF option to select one or the
other, which is now used instead.  There's now a single "tiff"
target to build either shared or static as required, and all the
tests and tools are linked with this. Note: the Windows tests fail
when linked with a static libtiff (says: libtiff.dll not found).
Not really a regression since this was not tested up to this
point, and it's likely the unit tests haven't (ever?) been run on
Windows with a static libtiff, so there's some additional
portability issue here to address.  Works fine on UNIX systems,
and fine on Windows with the default to build a DLL.

Add a missing file which wasn't being distributed, causing unit
tests to fail.  Note that "find . -name '*.cmake'" lists all the
CMake files which need distributing in addition to all the
CMakeLists.txt files (which now are distributed).
2015-09-01 02:51:50 +00:00
Even Rouault
704f717cf5 * libtiff/tif_predict.c: pedantic change to add explicit masking
with 0xff before casting to uchar in floating-point horizontal
differencing and accumulation routines.
2015-08-31 15:05:57 +00:00
Even Rouault
45e29cce8d * libtiff/tif_predict.c: fix generation of output with 16 bit
or 32 bit integer, when byte swapping is needed, in
horizontal predictor (#2521). Also fixes decoding when there is
a single pixel to code (unlikely case...) and byte swapping is
involved.
2015-08-31 14:36:10 +00:00
Bob Friesenhahn
e9b10efff9 Additional CMake-related files were missing from the distribution tarball. 2015-08-31 00:01:18 +00:00
Bob Friesenhahn
adc4f64c30 Make edit of html/Makefile.am its own step so it is not missed. 2015-08-30 21:40:39 +00:00
Bob Friesenhahn
1fea0da266 All the CMakeLists.txt files were missing from the distribution tarball. 2015-08-30 21:26:45 +00:00
Even Rouault
42bfc7006a * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid
undefined behaviour with shifts (gcc -fsanitize=shift)
2015-08-30 21:07:44 +00:00
Even Rouault
6dc8110cee * libtiff/tif_fax3.c, libtiff/tif_lzw.c, libtiff/tif_predict.c:
add explicit masking with 0xff before casting
to unsigned char (make icc -check=conversions happy)

* libtiff/tif_predict.c: operate on unsigned datatypes when
computing/applying differences to avoid undefined behaviour of
signed types (C standard compliance)
2015-08-30 20:49:55 +00:00
Bob Friesenhahn
27e622bff5 * configure.ac: libtiff 4.0.5 released. 2015-08-30 17:37:46 +00:00
Bob Friesenhahn
7663ccc1ec Fix compiler warning about constant value promotion to unsigned long. 2015-08-29 20:39:17 +00:00
Bob Friesenhahn
bcf0cb43f4 Add ld-version-script option to cmake build. 2015-08-29 15:30:28 +00:00