Commit Graph

3354 Commits

Author SHA1 Message Date
Thomas Bernard
5c222ec96c
tiffcrop: shut up clang warnings
make the out filename building a bit more simple
and remove the use of strcat()
2019-01-28 16:10:28 +01:00
Scott Gayou
0c74a9f49b Fix for simple memory leak that was assigned CVE-2019-6128.
pal2rgb failed to free memory on a few errors. This was reported
here: http://bugzilla.maptools.org/show_bug.cgi?id=2836.
2019-01-23 15:09:59 -05:00
Bob Friesenhahn
a0e273fdca Fix tiff2ps error regarding "Inconsistent value of es" by allowing es to be zero.
Problem was reported to the tiff mailing list by Julian H. Stacey on January 5, 2019.
2019-01-05 13:56:09 -06:00
Hugo Lefeuvre
d0a842c5db tif_dir: unset transferfunction field if necessary
The number of entries in the transfer table is determined as following:

(td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1

This means that whenever td->td_samplesperpixel or td->td_extrasamples are
modified we also need to make sure that the number of required entries in
the transfer table didn't change.

If it changed and the number of entries is higher than before we should
invalidate the transfer table field and free previously allocated values.
In the other case there's nothing to do, additional tf entries won't harm
and properly written code will just ignore them since spp - es < 1.

For instance this situation might happen when reading an OJPEG compressed
image with missing SamplesPerPixel tag. In this case the SamplesPerPixel
field might be updated after setting the transfer table.

see http://bugzilla.maptools.org/show_bug.cgi?id=2500

This commit addresses CVE-2018-19210.
2018-12-14 06:19:04 +01:00
Bob Friesenhahn
56a1976e92 Do not attempt to re-sync zip stream after reported data error from inflate(). 2018-12-08 15:36:14 -06:00
Even Rouault
ae0325a1ab Merge branch 'resource-leaks' into 'master'
Fix two resource leaks

See merge request libtiff/libtiff!43
2018-12-07 20:58:13 +00:00
Even Rouault
15d01b63a9 Merge branch 'build-jbig' into 'master'
add jbig support to the fuzzer

See merge request libtiff/libtiff!42
2018-12-07 20:56:22 +00:00
Bob Friesenhahn
d6f7cf744c tiffcrop.c: Avoid new clang warning about tools/tiffcrop.c "size argument in 'strncat' call appears to be size of the source". 2018-12-01 09:16:10 -06:00
Even Rouault
5bcf0cb3c1 Merge branch 'webp_memleak' into 'master'
fixed mem leak in webp compression

See merge request libtiff/libtiff!48
2018-11-28 21:54:25 +00:00
Norman Barker
9323b7b139 fixed mem leak in webp compression 2018-11-28 15:45:39 -06:00
Even Rouault
4e3faaf6f5 Merge branch 'lossless_webp' into 'master'
fixed lossless webp compression config

See merge request libtiff/libtiff!46
2018-11-20 19:32:10 +00:00
Norman Barker
c7774df9a7 fixed lossless webp compression config 2018-11-20 11:54:01 -06:00
Bob Friesenhahn
6b7fc9f116 snprintf porting fix for Visual Studio 2003 2018-11-18 20:25:17 -06:00
Roger Leigh
8addf2c1f7 ci: Add pages job 2018-11-18 10:37:37 +00:00
Bob Friesenhahn
2f79874c30 Change references from defunct ftp site to https site. 2018-11-10 14:38:21 -06:00
Bob Friesenhahn
64b6f939bf Change download URL from ftp to https protocol. 2018-11-10 13:46:14 -06:00
Bob Friesenhahn
6c3e4801bd HOWTO-RELEASE: Add GPG release file signing procedure. 2018-11-10 13:43:05 -06:00
Bob Friesenhahn
b8eac98dd0 libtiff 4.0.10 released. 2018-11-10 09:33:11 -06:00
Bob Friesenhahn
126a949736 Change COMPRESSION_ZSTD to 50000 and COMPRESSION_WEBP to 50001. 2018-11-10 08:58:18 -06:00
Bob Friesenhahn
779e54ca32 Added preliminary release notes for release 4.0.10 2018-11-04 14:14:25 -06:00
Bob Friesenhahn
2480971bba tiff2pdf: Eliminate compiler warning about snprintf output truncation when formatting pdf_datetime. 2018-11-03 13:27:20 -05:00
Olivier Paquet
2d25c90327 Merge branch 'no_tif_platform_console' into 'master'
Remove builtin support for GUI warning and error message boxes

See merge request libtiff/libtiff!24
2018-11-03 16:51:41 +00:00
Bob Friesenhahn
ed624dfe48 tiffcrop.c: Eliminate compiler warning about snprintf output truncation when formatting filenum. 2018-11-03 10:00:11 -05:00
Bob Friesenhahn
d1b5834dfe TWebPVGetField(): Add apparently missing break statement impacting TIFFTAG_WEBP_LOSSLESS. 2018-11-03 09:41:15 -05:00
Bob Friesenhahn
34b5be5a2e Eliminate compiler warnings about duplicate definitions of streq/strneq macros. 2018-11-03 09:35:19 -05:00
Bob Friesenhahn
64ee065f13 Ignore generated files 2018-11-03 09:34:52 -05:00
Bob Friesenhahn
b72c756c43 Remove and ignore files which are a product of autogen.sh 2018-11-03 09:22:11 -05:00
Bob Friesenhahn
90771bcd56 Fix TIFFErrorExt() formatting of size_t type for 32-bit compiles.
o
2018-11-02 07:34:22 -05:00
Nikola Forró
2f694198f1 Fix two resource leaks
Signed-off-by: Nikola Forró <nforro@redhat.com>
2018-10-31 11:50:48 +01:00
Even Rouault
99b10edde9
tiff2bw: avoid null pointer dereference in case of out of memory situation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2819 / CVE-2018-18661 2018-10-30 18:50:27 +01:00
Even Rouault
67b755b334
tiffio.h: fix comment 2018-10-30 18:49:53 +01:00
Paul Kehrer
2d32b100aa add jbig support to the fuzzer 2018-10-29 11:36:13 +08:00
Even Rouault
7030e8acbc Merge branch 'header2' into 'master'
Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h

See merge request libtiff/libtiff!41
2018-10-26 17:55:49 +00:00
Kurt Schwehr
f05e33ac98 Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h 2018-10-26 10:38:03 -07:00
Even Rouault
eaad7b257f Merge branch 'headers' into 'master'
Add includes to headers to allow them to stand alone.

See merge request libtiff/libtiff!40
2018-10-25 08:05:08 +00:00
Kurt Schwehr
725279bd1f Add includes to headers to allow them to stand alone.
This allows compilers that can do header stand alone header parsing
to process libtiff.
2018-10-24 16:29:33 -07:00
Even Rouault
4429f75fab
LZMAPreEncode: emit verbose error if lzma_stream_encoder() fails (typically because not enough memory available) 2018-10-18 11:10:31 +02:00
Even Rouault
d780c9db3f
tif_webp.c: fix previous commit that broke scanline decoding 2018-10-17 23:36:26 +02:00
Even Rouault
00a987988c
tif_webp.c: fix potential read outside libwebp buffer on corrupted images 2018-10-17 21:32:25 +02:00
Even Rouault
183102bc26 Merge branch 'jbig_decode_overflow' into 'master'
JBIG: fix potential out-of-bounds write in JBIGDecode()

See merge request libtiff/libtiff!38
2018-10-14 15:57:45 +00:00
Even Rouault
681748ec2f
JBIG: fix potential out-of-bounds write in JBIGDecode()
JBIGDecode doesn't check if the user provided buffer is large enough
to store the JBIG decoded image, which can potentially cause out-of-bounds
write in the buffer.
This issue was reported and analyzed by Thomas Dullien.

Also fixes a (harmless) potential use of uninitialized memory when
tif->tif_rawsize > tif->tif_rawcc

And in case libtiff is compiled with CHUNKY_STRIP_READ_SUPPORT, make sure
that whole strip data is provided to JBIGDecode()
2018-10-14 16:45:14 +02:00
Even Rouault
d438fab328
tif_webp.c: fix scanline reading/writing 2018-10-05 22:59:49 +02:00
Even Rouault
6aae33f758
WEBP codec: initialize nSamples in TWebPSetupDecode() and TWebPSetupEncode() 2018-10-05 22:03:24 +02:00
Even Rouault
1a926533b8 Merge branch 'tif_webp' into 'master'
webp support

See merge request libtiff/libtiff!32
2018-10-05 19:41:16 +00:00
Norman Barker
9eacd59fec webp in tiff 2018-10-05 11:21:17 -05:00
Even Rouault
31374a7bf1 Merge branch 'master' into 'master'
fix three potential vulnerabilities.

See merge request libtiff/libtiff!33
2018-09-17 18:33:33 +00:00
Young_X
97c95667f6 fix out-of-bound read on some tiled images. 2018-09-08 15:07:53 +08:00
Young_X
6da1fb3f64 avoid potential int32 overflows in multiply_ms() 2018-09-08 14:46:27 +08:00
Young_X
f1b94e8a3b only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4 2018-09-08 14:36:12 +08:00
Even Rouault
981e43ecae
TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit systems with large number of strips. Probably relates to http://bugzilla.maptools.org/show_bug.cgi?id=2788 / CVE-2018-10779 2018-08-15 16:34:40 +02:00