Commit Graph

1204 Commits

Author SHA1 Message Date
Bob Friesenhahn
547c3ecfcf (main): Quiet Coverity 1024223 "Untrusted value as argument". 2015-05-28 04:07:30 +00:00
Bob Friesenhahn
f795d89909 (main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)". 2015-05-28 03:52:00 +00:00
Bob Friesenhahn
6a41c7a28f * tools/ras2tiff.c: Fix Sun Raster header definition to be safe
for 64-bit systems.  Add some header validations.  Should fix many
Coverity issues.
2015-05-28 03:30:41 +00:00
Bob Friesenhahn
a80995a42b (get_histogram): Quiet Coverity 1024386 "Out-of-bounds read".
This was a benign mis-diagnosis but added code to enforce against
buffer overflow.
2015-05-28 03:08:18 +00:00
Bob Friesenhahn
73dcb5ee75 * tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting
level does not match indentation".
2015-05-28 02:25:11 +00:00
Bob Friesenhahn
c05bbbe6e8 (loadImage): Fix Coverity 1299740 "Out-of-bounds write". 2015-05-28 02:19:16 +00:00
Bob Friesenhahn
022cd04c80 (loadImage): Fix Coverity 1299741 "Dereference before null check". 2015-05-28 02:16:08 +00:00
Bob Friesenhahn
4d8fac3be8 (writeCroppedImage): Fix Coverity 1024797 "Nesting level does not
match indentation".
2015-05-28 02:11:00 +00:00
Bob Friesenhahn
e6aabe4992 (writeSingleSection): Fix Coverity 1024796 "Nesting level does not
match indentation".
2015-05-28 02:07:59 +00:00
Bob Friesenhahn
0ba4515b24 (readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead
code".
2015-05-28 02:02:09 +00:00
Bob Friesenhahn
7a8431b414 (readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or
modulo by zero".
2015-05-28 01:59:10 +00:00
Bob Friesenhahn
1752529e75 * tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical
vs. bitwise operator".
2015-05-28 01:50:20 +00:00
Even Rouault
7bed6738f2 * 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-03-02 16:16:38 +00:00
Even Rouault
cb66df4e65 * 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 15:14:45 +00:00
Even Rouault
a1caf14ce4 * libtiff 4.0.4beta released 2015-01-26 12:24:11 +00:00
Even Rouault
a17a6e5ecd * automake: updated to 1.15
* libtool: updated to 2.4.5
2015-01-26 10:29:40 +00:00
Even Rouault
45922132cf * tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013) 2015-01-22 09:58:49 +00:00
Frank Warmerdam
09dfa00849 remove note about requiring approval to join tiff list 2015-01-05 19:49:37 +00:00
Olivier Paquet
79676ae61c * tools/tiff2pdf.c: Fixed unsigned integer addition overflow detection. 2015-01-05 19:03:11 +00:00
Even Rouault
7f884b953c * libtiff/tif_dirread.c: in TIFFCheckDirOffset(), avoid uint16 overflow
when reading more than 65535 directories, and effectively error out when
reaching that limit.
2015-01-03 18:03:40 +00:00
Even Rouault
376ee1fc20 * libtiff/tif_jpeg.c: in JPEGFixupTags(), recognize SOF2, SOF9 and SOF10
markers to avoid emitting a warning (even if, according to the TechNote,
there are admitedly unusual/not recommended or even forbidden variants, but
they do work well with libjpeg for SOF2, and with libjpeg-turbo for SOF2,
SOF9 and SOF10).
Define in_color_space and input_components to the right values in
JPEGSetupEncode(), before calling jpeg_set_defaults(), as specified by
libjpeg API documentation, so as to be compatible with mozjpeg library.
Note: the default settings of mozjpeg will produce progressive scans, which
is forbidden by the TechNote.
2014-12-30 16:37:22 +00:00
Even Rouault
f828693705 * libtiff/tif_getimage.c: move test on vertical value of YCbCr subsampling.
to avoid buffer leak (fix previous fix, found by Coverity scan)
2014-12-29 18:28:46 +00:00
Bob Friesenhahn
429b3fdc90 * Update bundled libtool to 2.4.4 release. 2014-12-29 15:34:22 +00:00
Even Rouault
5b79c1f364 * libtiff/tif_next.c: add new tests to check that we don't read outside of
the compressed input stream buffer.

* libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
2014-12-29 12:09:11 +00:00
Even Rouault
5b06ac3f28 * libtiff/tif_dir.c: in TIFFDefaultDirectory(), reset any already existing
extented tags installed by user code through the extender mechaninm before
calling the extender callback (GDAL #5054)
2014-12-27 15:20:42 +00:00
Bob Friesenhahn
fdfa1a026f * tools/tiffcrop.c: Fix warnings about variables set but not used. 2014-12-26 16:32:31 +00:00
Bob Friesenhahn
a7ced11ff1 * contrib/iptcutil/iptcutil.c: Fix warnings about variables set
but not used.
2014-12-26 16:10:08 +00:00
Bob Friesenhahn
3b48ce4c7b * tools/tiffgt.c: Fix warnings about unused parameters. 2014-12-26 16:06:41 +00:00
Bob Friesenhahn
e501767856 * libtiff/tif_stream.cxx: Fix warnings about unused parameters. 2014-12-26 16:01:04 +00:00
Even Rouault
5ecaadc951 * libtiff/tif_getimage.c, libtiff/tif_ojpeg.c, libtiff/tif_zip.c: fix
various typos found by Debian lintian tool (GDAL #5756)
2014-12-25 18:29:11 +00:00
Even Rouault
65577375d4 * libtiff/tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling.
http://bugzilla.maptools.org/show_bug.cgi?id=2235
2014-12-24 16:57:18 +00:00
Even Rouault
34d71374cc * tools/tiff2pdf.c: fix buffer overflow on some YCbCr JPEG compressed images.
http://bugzilla.maptools.org/show_bug.cgi?id=2445
2014-12-24 16:32:28 +00:00
Even Rouault
a42442d21f * tools/tiff2pdf.c: fix buffer overflow on YCbCr JPEG compressed image.
Derived from patch by Petr Gajdos,
http://bugzilla.maptools.org/show_bug.cgi?id=2443
2014-12-24 15:38:11 +00:00
Even Rouault
59e876aeeb * libtiff/tif_dirread.c: In EstimateStripByteCounts(), check return code
of _TIFFFillStriles(). This solves crashing bug on corrupted
images generated by afl.
2014-12-23 11:06:54 +00:00
Even Rouault
ed7dd273d5 * libtiff/tif_read.c: fix several invalid comparisons of a uint64 value with
<= 0 by casting it to int64 first. This solves crashing bug on corrupted
images generated by afl.
2014-12-23 10:15:35 +00:00
Bob Friesenhahn
53c7c58dd7 * tools/tiffdump.c: Guard against arithmetic overflow when
calculating allocation buffer sizes.
2014-12-22 02:52:38 +00:00
Even Rouault
5db18217c3 * tools/tiff2bw.c: when Photometric=RGB, the utility only works if
SamplesPerPixel = 3. Enforce that
http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127)
2014-12-21 20:58:29 +00:00
Even Rouault
aaf52fa411 * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES
copying. The right fix would be to properly copy it, but not worth the burden
for those esoteric utilities.
http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127)
2014-12-21 20:04:31 +00:00
Even Rouault
47647443c1 * tools/thumbnail.c: fix out-of-buffer write
http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128)
2014-12-21 19:53:59 +00:00
Even Rouault
1246f97138 * tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAG_GROUP3OPTIONS
or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or
COMPRESSION_CCITTFAX4
http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128)
2014-12-21 18:52:42 +00:00
Even Rouault
7d3b9da6cb * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes
http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129)
2014-12-21 18:07:48 +00:00
Even Rouault
29f531aeec * tools/tiff2pdf.c: check return code of TIFFGetField() when reading
TIFFTAG_SAMPLESPERPIXEL
2014-12-21 17:36:36 +00:00
Even Rouault
2dae28a91b * tools/tiffcp.c: fix crash when converting YCbCr JPEG-compressed to none.
Based on patch by Tomasz Buchert (http://bugzilla.maptools.org/show_bug.cgi?id=2480)
Description: fix for Debian bug #741451
tiffcp crashes when converting JPEG-encoded TIFF to a different
encoding (like none or lzw). For example this will probably fail:
tiffcp -c none jpeg_encoded_file.tif output.tif
The reason is that when the input file contains JPEG data,
the tiffcp code forces conversion to RGB space. However,
the output normally inherits YCbCr subsampling parameters
from the input, which leads to a smaller working buffer
than necessary. The buffer is subsequently overrun inside
cpStripToTile() (called from writeBufferToContigTiles).
Note that the resulting TIFF file would be scrambled even
if tiffcp wouldn't crash, since the output file would contain
RGB data intepreted as subsampled YCbCr values.
This patch fixes the problem by forcing RGB space on the output
TIF if the input is JPEG-encoded and output is *not* JPEG-encoded.
Author: Tomasz Buchert <tomasz.buchert@inria.fr>
2014-12-21 16:28:37 +00:00
Even Rouault
89bef1935b Fix various crasher bugs on fuzzed images.
* libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for
TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing
the directory
* libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read ColorMap or
TransferFunction if BitsPerSample has not yet been read, otherwise reading
it later will cause user code to crash if BitsPerSample > 1
* libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with
SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8
* libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images
instead of imagewidth to avoid crash
* tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions
* tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by
libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB
* tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight
* tools/tiffdump.c: fix crash due to overflow of entry count.
2014-12-21 15:15:31 +00:00
Even Rouault
59d4cb0b11 libtiff/tif_jpeg.c: Fix regression introduced on 2010-05-07 that caused all tiles/strips to include quantization tables even when the jpegtablesmode had the JPEGTABLESMODE_QUANT bit set. Also add explicit removal of Huffman tables when jpegtablesmode has the JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the first tile/strip (only useful in update scenarios. create-only was fine) 2014-12-15 15:40:06 +00:00
Bob Friesenhahn
570fd679f6 * tools/tiff2pdf.c: Assure that memory size calculations for
_TIFFmalloc() do not overflow the range of tmsize_t.
2014-12-10 02:53:30 +00:00
Even Rouault
3f2b81f2c2 tools/thumbnail.c, tools/tiffcrop.c: fix heap read over-run found with Valgrind and Address Sanitizer on test suite 2014-12-07 22:33:06 +00:00
Bob Friesenhahn
02567e23b9 * tools/tiff2pdf.c (t2p_read_tiff_init): TIFFTAG_TRANSFERFUNCTION
tag can return one channel, with the other two channels set to
NULL.  The tiff2pdf code was expecting that other two channels
were duplicate pointers in the case where there is only one
channel.  Detect this condition in order to avoid a crash, and
presumably perform correctly with just one channel.
2014-12-07 19:32:25 +00:00
Bob Friesenhahn
3c92b0efc1 * tools/tiffdump.c: Fix double-free bug. 2014-12-06 15:58:40 +00:00
Even Rouault
8f38bc8e2d * libtiff/tif_config.vc.h: no longer use "#define snprintf _snprintf" with
Visual Studio 2015 aka VC 14 aka MSVC 1900
2014-11-27 17:22:10 +00:00
Even Rouault
abea4b2b04 * libtiff/tif_lzw.c: prevent potential null dereference of
sp->dec_codetab in LZWPreDecode (bug #2459)

* libtiff/tif_read.c: in TIFFReadBufferSetup(), avoid passing -1 size
to TIFFmalloc() if passed user buffer size is 0 (bug #2459)

* libtiff/tif_ojpeg.c: make Coverity happier (not a bug, #2459)

* libtiff/tif_dir.c: in _TIFFVGetField() and _TIFFVSetField(), make
Coverity happier (not a bug, #2459)

* libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make Coverity happier
(not a bug, #2459)

* tools/tiff2pdf.c: close PDF file (bug #2479)

* tools/fax2ps.c: check malloc()/realloc() result (bug #2470)

* tools/tiffdump.c: detect cycle in TIFF directory chaining (bug #2463)
and avoid passing a NULL pointer to read() if seek() failed before (bug #2459)

* tools/tiffcrop.c: fix segfault if bad value passed to -Z option
(bug #2459) and add missing va_end in dump_info (#2459)

* tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451)
2014-11-20 16:47:21 +00:00
Even Rouault
7af4d827dd * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on
corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471)
2014-11-20 14:34:51 +00:00
Even Rouault
d1be5cb7ad * automake: updated to 1.14.1
* libtool: updated to 2.4.3
* HOWTO-RELEASE: small update about autotools building order
2014-11-20 14:28:16 +00:00
Olivier Paquet
e4f269ed3f * tools/tiff2pdf.c: Preserve input file directory order when pages
are tagged with the same page number.
2014-10-20 17:52:05 +00:00
Bob Friesenhahn
9885124f1e * libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect
count for tag should be a warning rather than an error since
errors terminate processing.
2014-08-31 20:32:53 +00:00
Bob Friesenhahn
f6fc518396 * tools/tiff2rgba.c (]): Fixed tiff2rgba usage message in that zip
was wrongly described.  Fix suggested by Miguel Medalha.
2014-06-08 03:37:01 +00:00
Bob Friesenhahn
3d49c58cf8 Clarify that patch was by Steve Underwood but forwarded to me by Lee Howard 2014-05-07 13:31:11 +00:00
Bob Friesenhahn
f9f939b5e6 * libtiff/tif_dirinfo.c (TIFFField) : Fix data type for
TIFFTAG_GLOBALPARAMETERSIFD tag.  Patch by Lee Howard.
2014-05-07 01:54:29 +00:00
Frank Warmerdam
de103a76f8 fix last fix to TIFFNumberOfDirectories() 2013-11-30 20:24:36 +00:00
Frank Warmerdam
e2f7c06cc5 Error out on directory counting overflow. 2013-10-21 18:23:48 +00:00
Bob Friesenhahn
f4203fa738 * libtiff/tif_dir.c (TIFFAdvanceDirectory): If nextdir is found to
be defective, then set it to zero before returning error in order
to terminate processing of truncated TIFF.  Issue found and fix
suggested by Richard Nolde.

* tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244)
* tools/tiff2pdf.c: terminate after failure of allocating
* tools/tiffinfo.c: Default various values fetched with
2013-09-13 02:34:50 +00:00
Frank Warmerdam
163627448a fix possible OOB write in gif2tiff.c 2013-08-14 13:59:16 +00:00
Frank Warmerdam
44650c28f1 make more resistent to corrupt/hostile input files (#2450, CVE-2013-4231) 2013-08-14 05:18:53 +00:00
Frank Warmerdam
67d92d90f8 ensure return after memory allocation failure (#2449, CVS-2013-4232) 2013-08-14 05:11:36 +00:00
Frank Warmerdam
4e7465a311 initialize TIFFGetField() fetched values in tiffinfo.c 2013-07-10 00:44:22 +00:00
Tom Lane
96ceea8c8a Rewrite t2p_process_jpeg_strip(), to fix CVE-2013-1960. 2013-05-02 14:54:08 +00:00
Tom Lane
b6d66f9f30 Replace sprintf with snprintf, to fix CVE-2013-1961. 2013-05-02 14:44:29 +00:00
Bob Friesenhahn
e90c73e611 * configure.ac: Applied patch by Brad Smith to improve pkg-config
static linking by adding -lm to Libs.private when needed.
2013-03-29 16:50:11 +00:00
Tom Lane
feb6bd9f1d Sync tool usage printouts and man pages with reality. 2013-03-06 03:35:09 +00:00
Bob Friesenhahn
c9aee05b27 Strip extraneous trailing white-space from ChangeLog 2013-01-26 02:35:44 +00:00
Bob Friesenhahn
c204ef2a2f * tools/tiff2ps.c:Fix bug in auto rotate option code. Once a
rotation angle was set by the auto rotate check, it was retained
for all pages that followed instead of being retested for each
page.  Patch by Richard Nolde.
2013-01-26 02:24:05 +00:00
Frank Warmerdam
859bdf7523 avoid type cast warnings 2013-01-18 21:57:12 +00:00
Frank Warmerdam
f6bca3f994 avoid warnings on MSVC (bug 2427) 2013-01-18 21:37:13 +00:00
Tom Lane
46618e9d97 Fix raw_decode test to pass with more versions of libjpeg 2012-12-20 18:08:07 +00:00
Tom Lane
f752daaaab Fix TIFF_VARIABLE/TIFF_VARIABLE2 confusion in TIFFPrintDirectory. 2012-12-12 22:50:18 +00:00
Tom Lane
800527edd2 Improve previous patch for CVE-2012-4564. 2012-12-10 18:19:11 +00:00
Tom Lane
bff7f45716 Detect integer overflow in addition when computing buffer size. 2012-12-10 17:27:13 +00:00
Bob Friesenhahn
74295b7487 * tools/tiffset.c: tiffset now supports a -u option to unset a
tag.  Patch by Zach Baker. See
http://bugzilla.maptools.org/show_bug.cgi?id=2419
2012-12-04 03:02:37 +00:00
Bob Friesenhahn
281ba91d09 * automake: Update Automake to 1.12.5 release. 2012-11-18 18:08:31 +00:00
Bob Friesenhahn
b47e5f1a73 * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
require malloc() to return NULL pointer if requested allocation
size is zero.  Assure that _TIFFmalloc does.
2012-11-18 17:51:52 +00:00
Frank Warmerdam
37671b36b9 fix zero size buffer exploit (CVE-2012-4564) in ppm2tiff 2012-11-02 05:13:24 +00:00
Frank Warmerdam
98fc7e047a avoid crash on null zip error messages 2012-10-18 17:34:59 +00:00
Bob Friesenhahn
21a904d74c * libtiff 4.0.3 released. 2012-09-22 16:12:43 +00:00
Bob Friesenhahn
f458c10308 * Makefile.am: Update to Automake 1.12.4 2012-09-20 13:50:27 +00:00
Bob Friesenhahn
ec5ce9c2b3 * Makefile.in: Update to Automake 1.12.3 2012-08-19 17:00:46 +00:00
Bob Friesenhahn
7d38024b8d * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add
some TIFF/FX support in libtiff.  Add the tag definitions to
tiff.h.  Add the related TIFF field definitions to tif_dirinfo.c,
and also fixes an error in a comment.  Adds the photometric values
to tif_print.c, and fixes a bug.  These changes are by Steve
Underwood.

* libtiff/tif_write.c: Fix bug rewriting image tiles in a
2012-08-19 16:56:32 +00:00
Frank Warmerdam
d85a64b6d6 fix bug rewriting image tiles in a compressed file (gdal #4771) 2012-08-13 22:10:17 +00:00
Frank Warmerdam
76cb1b57bf warn when ignoring some corrupt tags 2012-08-02 22:04:41 +00:00
Tom Lane
84595b4fd7 Add accessor functions for the opaque type TIFFField. 2012-07-29 15:45:29 +00:00
Tom Lane
73dec72e8a Fix a couple more tiff2pdf bugs. 2012-07-19 15:43:41 +00:00
Tom Lane
7e000dd360 In tiff2pdf.c, fail when TIFFSetDirectory() fails. 2012-07-18 15:07:55 +00:00
Bob Friesenhahn
a5681ca6f0 * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+.
IJG JPEG 7+ uses a different upsampling algorithm which produces
different numeric results.

* libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to
work with IJG JPEG 7+.
2012-07-06 17:05:16 +00:00
Bob Friesenhahn
22c4ecd4a8 test/raw_decode.c: Add changes so that test can run with build directory outside of source directory. 2012-07-04 19:45:32 +00:00
Frank Warmerdam
8eeed8edf4 Fix handling when writing RGBA jpeg compressed imagery (gdal #4732) 2012-07-03 00:57:50 +00:00
Frank Warmerdam
ea64110a44 fix fax3 runs initialization sizing 2012-06-21 02:01:31 +00:00
Frank Warmerdam
b48c0a0604 make tbuf large enough for one stride past the end 2012-06-21 01:01:53 +00:00
Frank Warmerdam
c25b5e77d6 avoid read past end of source data buffer with corrupt data 2012-06-20 05:22:51 +00:00
Frank Warmerdam
111baa289b updated for 4.0.2 release 2012-06-16 00:19:35 +00:00
Frank Warmerdam
0055471655 avoid some clang warnings 2012-06-15 21:51:54 +00:00
Tom Lane
f5077ed7ed Fix CVE-2012-2113 2012-06-15 21:44:31 +00:00
Frank Warmerdam
4d26dcb281 be careful about printing corrupt inknames fields 2012-06-13 01:08:51 +00:00
Frank Warmerdam
da49b1d230 ensure fax3/4 runs array is initialized 2012-06-13 00:27:20 +00:00
Frank Warmerdam
0615e2a2b6 avoid pretty printing values without proper rawdata 2012-06-08 05:15:21 +00:00
Frank Warmerdam
2adf098410 improve handling of PAGENUMBER, HALFTONEHINTS, YCBCRSUBSAMPLING and DOTRANGE 2012-06-06 06:06:20 +00:00
Frank Warmerdam
7e632eb41c treat illegal ycbcrsubsampling as runtime error, not assertion 2012-06-06 05:33:55 +00:00
Frank Warmerdam
783c1ba4ce add TIFFCreate{Custom,EXIF}Directory() functions 2012-06-06 04:58:00 +00:00
Frank Warmerdam
0725eccdc2 avoid special handling of PAGENUMBER, HALFTONEHINTS, YCBCRSUBSAMPLING and DOTRANGE in non-image directories 2012-06-06 04:56:01 +00:00
Frank Warmerdam
672946cf9b avoid adjusting h/v_sampling in JPEGPreDecode() 2012-06-05 03:24:30 +00:00
Frank Warmerdam
b3dadc7ff3 avoid reading imagery with -D in EXIF directories 2012-06-01 23:22:53 +00:00
Frank Warmerdam
86a9d53d9e Added _SEPARATED CMKY support (#2379) 2012-06-01 22:22:04 +00:00
Frank Warmerdam
ecf4fed966 use strerror() for open error messages on unix (#2341) 2012-06-01 21:40:58 +00:00
Frank Warmerdam
f8fcbec59d fix serious issues with JPEGDecodeRaw() (bug 2386) Also some whitespace reformatting 2012-06-01 21:08:51 +00:00
Frank Warmerdam
52e121504b fix buffer overrun in JPEGDecodeRaw() with mixed up sampling 2012-06-01 01:30:55 +00:00
Frank Warmerdam
9184521f3f make sure tif_rawdatasize is zeroed when tif_rawdata is freed/cleared 2012-06-01 00:55:09 +00:00
Frank Warmerdam
0dd52ae391 Add alpha grayscale image support to TIFFReadRGBAImage 2012-06-01 00:38:39 +00:00
Frank Warmerdam
79a2449b27 fix handling of tags in custom directories which happen to match standard tags but are defined differently in the custom dir 2012-05-30 04:58:13 +00:00
Frank Warmerdam
047f4120df avoid inappropriate use of tif_rawdata when it is a pointer into mmaped file 2012-05-30 01:50:17 +00:00
Frank Warmerdam
bcc1656171 Allocate working buffer one word larger since we "forward accumulate" and overwrite the end by one word in at least some cases. 2012-05-24 23:21:45 +00:00
Frank Warmerdam
c6d8cdcf29 avoid accessing out of the lookup arrays for out of range inputs. 2012-05-24 05:25:14 +00:00
Frank Warmerdam
920688aac5 avoid uninitialized variable for degenerate files 2012-05-24 03:50:31 +00:00
Frank Warmerdam
dbfa4e6f60 if OJPEGWriteHeader() fails once do not bother trying again on the same image. 2012-05-24 03:15:18 +00:00
Frank Warmerdam
c073384446 make things more resilient in the face of files without stripbytecounts or stripoffsets or where loading these fails. 2012-05-24 02:43:51 +00:00
Frank Warmerdam
af47ad26e2 be careful about whether min/max values per singular or per sample 2012-05-24 02:29:06 +00:00
Frank Warmerdam
e54e9545a0 fix crash with odd 16bit count types for some custom fields 2012-05-24 01:40:24 +00:00
Frank Warmerdam
c634536376 avoid one byte past end of ink names reading in some cases 2012-05-24 01:03:37 +00:00
Bob Friesenhahn
b298ae255c * man/TIFFGetField.3tiff: Correct the 'count' field type in the
example for how to retreive the value of unsupported tags.
2012-05-19 23:15:22 +00:00
Frank Warmerdam
f502a159f9 Fix size overflow (zdi-can-1221,CVE-2012-1173) care of Tom Lane @ Red Hat. 2012-04-06 16:46:31 +00:00
Bob Friesenhahn
75b1743466 * libtiff 4.0.1 released. 2012-02-18 22:11:19 +00:00
Bob Friesenhahn
d766e7c5a0 * Update automake used to 1.11.3. 2012-02-18 21:58:02 +00:00
Bob Friesenhahn
c3d1b83b0d * libtiff/tiffio.h: Use double-underbar syntax in GCC printf
attribute specification to lessen the risk of accidental macro
substitution.  Patch from Vincent Torri.
2012-02-18 16:20:26 +00:00
Frank Warmerdam
3bdfb317f4 adjustments for security/null pointer issues - I do not think any of them are real, but they make future security audits easier 2012-02-01 01:51:00 +00:00
Bob Friesenhahn
b326998fc2 * configure.ac: Add support for using library symbol versioning on
ELF systems with the GNU linker.  Support is enabled via
--enable-ld-version-script.  Disabled by default for now until
there is a decision for how to deploy a libtiff with versioned
symbols after libtiff 4.0.0 was already released.
2012-01-22 19:50:36 +00:00
Bob Friesenhahn
306ae2fb9f * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in
tif_win32.c.  Patch by Edward Lam.
2011-12-22 17:07:57 +00:00
Bob Friesenhahn
d338f7fe22 * configure.ac: Add libtiff private dependency on -llzma for
pkg-config.  Patch by Mark Brand.
Updated Automake to 1.11.2.
2011-12-22 17:03:48 +00:00
Bob Friesenhahn
f7b79dc7dc Released libtiff 4.0.0. 2011-12-22 00:29:28 +00:00
Frank Warmerdam
20499fa9b1 more cautious testing of _TIFFFillStriles() results (gdal #4372) 2011-12-09 03:29:10 +00:00
Frank Warmerdam
7d9fbf6d9d fix crash with invalid files, strip chopping and deferred strile loading (gdal #4372) 2011-12-08 05:48:39 +00:00
Frank Warmerdam
ee5c8c505e fix error reporting when there is no tag information struct and name (gdal #4373) 2011-12-08 05:43:26 +00:00
Bob Friesenhahn
ee7c87492b * Update GNU libtool to 2.4.2. 2011-10-22 17:06:02 +00:00
Bob Friesenhahn
cae87ed58a * tools/tiffsplit.c (tiffcp): TIFFGetField count field should be
uint32 type for TIFFTAG_JPEGTABLES.  Patch by Christophe
Deroulers.
2011-10-22 17:03:00 +00:00
Frank Warmerdam
63eb8b5578 restore TIFFMergeFieldInfo in libtiff.def (#42) 2011-06-21 16:43:26 +00:00
Bob Friesenhahn
c51502913d * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also
upon failure to allocate "resizeddata".
* tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for
allocation failure, not before.
2011-05-31 17:10:18 +00:00
Bob Friesenhahn
aacd29d141 * libtiff/tif_ojpeg.c: plug leaks on OJPEG read failure path 2011-05-31 17:05:07 +00:00
Bob Friesenhahn
d73e9e8b19 * tools/rgb2ycbcr.c (cvtRaster): unchecked malloc 2011-05-31 17:03:16 +00:00
Bob Friesenhahn
bd77483087 * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark
NULL-deref and possible overflow
2011-05-31 17:00:03 +00:00
Bob Friesenhahn
e66a15f97e * tools/tiff2pdf.c: remove decl+set of set-but-not-used local, "written" 2011-05-31 16:57:10 +00:00
Bob Friesenhahn
91b49a4539 * libtiff/tif_jpeg.c (JPEGInitializeLibJPEG): Remove declaration
and set of otherwise unused local, data_is_empty.
2011-05-31 16:54:15 +00:00
Bob Friesenhahn
1e2aed2807 * libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]:
Diagnose out-of-memory failure and return 0 rather than
dereferencing NULL.
2011-05-31 16:51:50 +00:00
Frank Warmerdam
f8a3650a7c improve error report with zero tag directories 2011-05-24 13:35:30 +00:00
Frank Warmerdam
9437f9db5a restore TIFFMergeFieldInfo (#2315) 2011-05-17 00:21:17 +00:00
Frank Warmerdam
34b7557400 Remove obsolete field info api, add missing items in libtiff.def (#2315, #2316) 2011-04-20 15:23:38 +00:00
Bob Friesenhahn
feab28eac4 Release v4-0-0beta7. 2011-04-09 21:01:00 +00:00
Bob Friesenhahn
c546a4ccf8 * configure.ac: Should use AC_CANONICAL_HOST since host specifies
the run-time target whereas target is used to specify the final
output target if the package is a build tool (like a compiler),
which libtiff is not.  Resolves libtiff bug 2307 "Use
AC_CANONICAL_HOST macro".
2011-04-09 15:43:03 +00:00
Bob Friesenhahn
519b727004 * configure.ac: Support configuring TIFF_INT64_FORMAT and
TIFF_UINT64_FORMAT appropriately for MinGW32.

* tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32
printf conventions for 64-bit types because it uses the WIN32 CRT.

* libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c,
tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32
printf conventions for 64-bit types because it uses the WIN32 CRT.

* tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not
understood by WIN32 CRT.
2011-04-02 20:54:08 +00:00
Bob Friesenhahn
b69a1998be * libtiff/tif_ojpeg.c: Fixes to compile with MinGW32 GCC.
* tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since
it is much more portable.  Tmpfile is included in ISO/IEC
9899:1990 and the WIN32 CRT.
2011-04-02 19:30:20 +00:00
Frank Warmerdam
a9a1d1c65f Add -d and -sd switches to tiffset to allow operation on a particular
directory instead of just the first (jef)
2011-03-26 12:07:20 +00:00
Frank Warmerdam
0cea5839cc Correct potential buffer overflow with thunder encoded files with wrong
bitspersample set (CVE-2011-1167)
http://bugzilla.maptools.org/show_bug.cgi?id=2300
2011-03-21 16:02:27 +00:00
Frank Warmerdam
4dda1458c6 allow zero length runs at start of fax3 lines 2011-03-10 20:23:07 +00:00
Frank Warmerdam
8e9fb97983 incorporate a fix for possible fax3 decoding overflow (CVE-2011-0192) 2011-03-03 01:38:25 +00:00
Frank Warmerdam
010a264507 avoid divide by zero in degenerate case (#2296) 2011-02-23 21:57:59 +00:00
Frank Warmerdam
91479f4d42 avoid leaks if TIFFRGBAImageBegin() fails (#2295) 2011-02-23 21:46:09 +00:00
Frank Warmerdam
202ed69f77 fix rawcp/rawcc maintinance for lzma compressor 2011-02-22 21:55:13 +00:00
Frank Warmerdam
bc3bc9925b added a configure option to enable CHUNKY_STRIP_READ support (--enable-chunky-strip-read) 2011-02-18 21:54:22 +00:00
Frank Warmerdam
82361dfa04 implement optional support for deferred strip/tile offset/size loading 2011-02-18 20:53:04 +00:00
Frank Warmerdam
29beec44d2 remove unused variable 2011-02-11 19:21:03 +00:00
Frank Warmerdam
1b73b3d840 fix buffer overrun problem with error/warning report in non-console win32 builds (popups) (#2293) 2011-02-09 18:05:00 +00:00
Olivier Paquet
addab4c8aa Added support for TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE to have
different values for each sample. Presents the min/max of all samples by
default for compatibility. TIFFSetField/TIFFGetField can be made to handle
those tags as arrays by changing the new TIFFTAG_PERSAMPLE pseudo tag.
http://www.asmail.be/msg0055458208.html
2011-01-24 21:06:31 +00:00
Frank Warmerdam
a8785bf9f4 fix tif_rawcp/rawcc handling for zip, note it is missing for pixarlog 2011-01-06 16:00:23 +00:00
Frank Warmerdam
c89c8c07c7 ensure rawcp and rawcc are maintained by JPEG decoder, improve read ahead for CHUNKY_STRIP_READ_SUPPORT 2011-01-06 05:51:13 +00:00
Lee Howard
32f670caaa Another regression fix. 2011-01-04 02:52:00 +00:00
Lee Howard
863cbb8823 * libtiff/tif_jpeg.c: Fix regression with 3 band image caused by
commit on 2010-12-14 submitted by e-mail from
        Even Rouault <even.rouault@mines-paris.org>
2011-01-04 02:38:51 +00:00
Olivier Paquet
cb413f61f5 * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE.
http://bugzilla.maptools.org/show_bug.cgi?id=2266
2010-12-31 17:51:08 +00:00
Andrey Kiselev
c46a15cf97 *** empty log message *** 2010-12-23 13:39:00 +00:00
Andrey Kiselev
9f29be434f Remove remaining CVS stuff. 2010-12-22 15:33:48 +00:00
Andrey Kiselev
c748648843 Added missed record for LZMA codec. 2010-12-22 15:30:54 +00:00
Bob Friesenhahn
9f3e08cf94 Needed to add tif_lzma.c to the Makefile. 2010-12-18 16:30:15 +00:00
Lee Howard
bf44739aea * libtiff/tif_dirread.c: tolerate some cases where
FIELD_COLORMAP is missing
        http://bugzilla.maptools.org/show_bug.cgi?id=2189
2010-12-15 01:05:02 +00:00
Lee Howard
69bb27992d * libtiff/tif_read.c: change read_ahead to tmsize_t
http://bugzilla.maptools.org/show_bug.cgi?id=2222
2010-12-15 00:43:25 +00:00
Lee Howard
ccdc78ec32 * configure.ac, libtiff/Makefile.am: Build tif_win32.c on
Windows except on Cygwin
        http://bugzilla.maptools.org/show_bug.cgi?id=2224
2010-12-15 00:37:00 +00:00
Lee Howard
cb405082bb * tools/gif2tiff.c: fix buffer overrun
http://bugzilla.maptools.org/show_bug.cgi?id=2270
2010-12-15 00:22:44 +00:00
Lee Howard
7a01aa5d24 * libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order
to improve compatibility with various viewers
        submitted by e-mail from Dwight Kelly <dkelly@apago.com>
2010-12-14 23:58:39 +00:00
Lee Howard
630dc52808 * tools/fax2ps.c: be consistent with page-numbering
http://bugzilla.maptools.org/show_bug.cgi?id=2225
2010-12-14 03:16:45 +00:00
Lee Howard
907489cd99 * libtiff/tif_color.c: prevent crash in handling bad TIFFs
resolves CVE-2010-2595
        http://bugzilla.maptools.org/show_bug.cgi?id=2208
2010-12-14 02:22:41 +00:00
Lee Howard
d96a823670 * tools/tiffcrop.c: new release by Richard Nolde
http://bugzilla.maptools.org/show_bug.cgi?id=2004
2010-12-14 02:03:24 +00:00
Lee Howard
3cb55ee486 * tools/tiff2pdf.c: fix colors for images with RGBA
interleaved data
        http://bugzilla.maptools.org/show_bug.cgi?id=2250
2010-12-13 05:41:38 +00:00
Lee Howard
7f39edf058 * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files
http://bugzilla.maptools.org/show_bug.cgi?id=2164
2010-12-13 05:15:50 +00:00
Lee Howard
3c383d15fa * tools/tiff2pdf.c: remove invalid duplication for Lab
http://bugzilla.maptools.org/show_bug.cgi?id=2162
2010-12-12 06:58:26 +00:00
Lee Howard
6972648b60 * libtiff/tif_jpeg.c: fix use of clumplines calculation
http://bugzilla.maptools.org/show_bug.cgi?id=2149
2010-12-12 01:55:00 +00:00
Lee Howard
9cf3b2cd4c * tools/fax2ps.c: replace unsafe tmpfile() with mkstemp()
http://bugzilla.maptools.org/show_bug.cgi?id=2118
2010-12-12 01:11:56 +00:00
Lee Howard
6975482a3a * libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c,
libtiff/tif_zip.c: fix build errors for VC6
        http://bugzilla.maptools.org/show_bug.cgi?id=2105
2010-12-11 23:52:27 +00:00
Lee Howard
7335412b5a * libtiff/tif_dirread.c: warnings cleanup
http://bugzilla.maptools.org/show_bug.cgi?id=2092
2010-12-11 23:22:06 +00:00
Lee Howard
3467f1927f * libtiff/tif_stream.cxx: warnings cleanup
http://bugzilla.maptools.org/show_bug.cgi?id=2091
2010-12-11 23:12:29 +00:00
Lee Howard
e70efefb35 * tools/tiff2pdf.c: add fill-page option
http://bugzilla.maptools.org/show_bug.cgi?id=2051
2010-12-11 22:47:49 +00:00
Lee Howard
9be929fe91 * libtiff/tif_dirread.c: modify warnings
http://bugzilla.maptools.org/show_bug.cgi?id=2016
2010-12-11 22:28:30 +00:00
Lee Howard
6707ee9df3 * libtiff/tif_ojpeg.c: fix buffer overflow on problem data
http://bugzilla.maptools.org/show_bug.cgi?id=1999
2010-12-11 21:23:21 +00:00
Lee Howard
046a69c47a * tools/tiffinfoce.c: strip byte counts are uint64* now 2010-12-11 19:33:48 +00:00
Lee Howard
22ea884fcd 2010-12-08 Lee Howard <faxguy@howardsilvan.com>
* libtiff/tif_ojpeg.c: fix crash when reading a TIFF with a zero
        or missing byte-count tag
        * tools/tiffsplit.c: abort when reading a TIFF without a byte-count
        per http://bugzilla.maptools.org/show_bug.cgi?id=1996
2010-12-11 19:16:47 +00:00
Lee Howard
15c0109ab3 fix crash when reading a badly-constructed TIFF per
http://bugzilla.maptools.org/show_bug.cgi?id=1994
2010-12-08 17:50:49 +00:00
Bob Friesenhahn
faf5f3ebae * libtiff-4.pc.in: Added libtiff pkg-config .pc file support.
Patch by Vincent Torri.
2010-11-27 20:54:51 +00:00
Frank Warmerdam
756ab12a5e various fixes for win32 porting 2010-10-21 19:07:32 +00:00
Lee Howard
4536beaed1 See: http://bugzilla.maptools.org/show_bug.cgi?id=1983
* tools/tiff2ps.c: improvements and enhancements from Richard Nolde
        with additional command line options for Document Title,
        Document Creator, and Page Orientation
2010-09-26 05:39:31 +00:00
Bob Friesenhahn
28d10ec5bd * tools/tiffcrop.c: Patch from Richard Nolde to avoid a
potentially unterminated buffer due to using an exceptionally long
file name.
2010-07-13 15:51:37 +00:00
Andrey Kiselev
548b403d10 Fixed ID buffer filling in t2p_write_pdf_trailer(), thanks to Dmitry V. Levin. 2010-07-08 09:37:52 +00:00
Andrey Kiselev
9969e64b8f Really reset the tag count in CheckDirCount() to expected value as the warning
message suggests. As per bug http://bugzilla.maptools.org/show_bug.cgi?id=1963
2010-07-07 15:13:57 +00:00
Andrey Kiselev
897e7e9491 Properly handle TIFFTAG_PAGENUMBER, TIFFTAG_HALFTONEHINTS,
TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE which should be set by value.
2010-07-06 14:30:38 +00:00
Andrey Kiselev
1cf8becfc2 Don't use assertions in _TIFFFieldWithTag() and _TIFFFieldWithName() if the
tag is not found in the tag table. This should be normal situation and
returned NULL value should be properly handled by the caller.
2010-07-06 14:16:05 +00:00
Andrey Kiselev
2a34d038af Avoid wrong math du to the signed/unsigned integer type conversions. As per
bug http://bugzilla.maptools.org/show_bug.cgi?id=2207
2010-07-02 13:39:10 +00:00
Andrey Kiselev
a32e672131 Fix the count for WhitePoint tag as per bug
http://bugzilla.maptools.org/show_bug.cgi?id=2042
2010-07-02 12:02:56 +00:00
Andrey Kiselev
35f7b45fa3 *** empty log message *** 2010-07-02 10:02:19 +00:00
Andrey Kiselev
b3395bf1f1 *** empty log message *** 2010-07-02 09:48:25 +00:00
Andrey Kiselev
0cd06f1134 *** empty log message *** 2010-07-01 15:56:56 +00:00
Andrey Kiselev
5122fdb3e0 *** empty log message *** 2010-06-30 16:04:50 +00:00
Andrey Kiselev
5a48f5167f *** empty log message *** 2010-06-30 15:41:49 +00:00
Andrey Kiselev
f4eff24f63 *** empty log message *** 2010-06-30 14:12:03 +00:00
Andrey Kiselev
aa50cfd0aa *** empty log message *** 2010-06-25 12:24:13 +00:00
Bob Friesenhahn
ee8700a596 * tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr
subsampled data since tiffcrop currently doesn't support it.  Fix
JPEG support.
2010-06-16 01:54:48 +00:00
Frank Warmerdam
20ea500233 fix invocation of tagcompare function (#2201) 2010-06-13 19:37:23 +00:00
Frank Warmerdam
75f7f78120 various fixes for tiff2pdf (#2211) 2010-06-13 19:25:54 +00:00
Bob Friesenhahn
e492476518 * libtiff/tiffiop.h (TIFFSafeMultiply): Need more castings to
avoid compiler warnings if parameter types are not sign
consistent.
2010-06-12 02:55:30 +00:00
Bob Friesenhahn
af78267c3b * libtiff 4.0.0alpha6 released. 2010-06-11 22:58:57 +00:00
Bob Friesenhahn
d30823e382 * tools/tiffcrop.c: Applied patch from Richard Nolde: Corrected
European page size dimensions.  Added an option to allow the user
to specify a custom page size on the command line.  Fix the case
where a page size specified with a fractional part was being
coerced to an integer by retyping the variables that define the
paper size.
2010-06-11 22:25:36 +00:00
Bob Friesenhahn
a6ea66c2af * html/index.html: Update for the 3.9.3 release. 2010-06-11 22:08:01 +00:00
Bob Friesenhahn
bbf76bce0f * tools/tiffcp.c (tiffcp): Applied Tom Lane's patch to reject
YCbCr subsampled data since tiffcp currently doesn't support it.
http://bugzilla.maptools.org/show_bug.cgi?id=2097
2010-06-11 21:23:12 +00:00
Bob Friesenhahn
5ec011cfe7 * Update libtool to version 2.2.10. 2010-06-11 20:31:38 +00:00
Bob Friesenhahn
ce4acf471d * libtiff/tiffiop.h (TIFFSafeMultiply): Work properly if
multiplier is zero.
2010-06-10 22:53:11 +00:00
Bob Friesenhahn
d36017b938 * libtiff/tif_fax3.c (Fax3SetupState): Yesterday's fix for
CVE-2010-1411 was not complete.

* libtiff/tiffiop.h (TIFFSafeMultiply): New macro to safely
multiply two integers.  Returns zero if there is an integer
overflow.

* tools/tiffcp.c (main): tiffcp should not leak memory if an error
is reported when reading the input file.
2010-06-09 17:17:13 +00:00
Bob Friesenhahn
3adc33842b * Update libtool to version 2.2.8.
* libtiff/tif_fax3.c (Fax3SetupState): Avoid under-allocation of
buffer due to integer overflow in TIFFroundup() and several other
potential overflows.  In conjunction with the fix to TIFFhowmany(),
fixes CVE-2010-1411.

* libtiff/tiffiop.h (TIFFhowmany): Return zero if parameters would
result in an integer overflow. This causes TIFFroundup() to also
return zero if there would be an integer overflow.
2010-06-08 23:32:22 +00:00
Bob Friesenhahn
bfbc717684 * contrib: Add an emacs formatting mode footer to all source files
so that emacs can be effectively used.
2010-06-08 18:55:15 +00:00
Frank Warmerdam
13ab8a93b6 added -x switch to tiffcp to (re)number allt he pages (#2203) 2010-06-03 17:01:01 +00:00
Olivier Paquet
2dacef9ea0 * libtiff/tif_dirread.c: Restored TIFFReadDirEntryFloat function in order
to add missing TIFF_SETGET_FLOAT case to TIFFFetchNormalTag.
* libtiff/tif_dirinfo.c: Use correct set_field_type for
TIFFTAG_PIXAR_FOVCOT so it is readable again (regression from 3.9.2).
http://bugzilla.maptools.org/show_bug.cgi?id=2192
2010-05-08 18:34:26 +00:00
Frank Warmerdam
8542b73911 ensure quality always set in JPEGPreEncode (gdal #3539) 2010-05-07 18:38:46 +00:00
Andrey Kiselev
c7f2a88a9e Regenerated from the source. 2010-05-06 10:01:02 +00:00
Olivier Paquet
5d55f189fc * libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which
had stopped working. Also made it always print 6 floats instead of
2*SamplesPerPixel.
http://bugzilla.maptools.org/show_bug.cgi?id=2191
http://bugzilla.maptools.org/show_bug.cgi?id=2186
* man/TIFFGetField.3tiff, man/TIFFSetField.3tiff: Fixed doc to reflect the
fact that libtiff considers TIFFTAG_REFERENCEBLACKWHITE to be 6 floats.
2010-05-06 02:56:46 +00:00
Frank Warmerdam
e3c51cb8e6 fix to use memcmp(), not memcpy() for checking jpeg tables header 2010-05-05 18:38:38 +00:00
Frank Warmerdam
80b552d22f avoid spurious jpeg table updates 2010-04-21 20:46:17 +00:00
Olivier Paquet
117b4bd0c6 * libtiff/tif_dirinfo.c: Fixed reading of 4 pixar tags.
http://bugzilla.maptools.org/show_bug.cgi?id=2139
2010-04-20 15:25:29 +00:00
Bob Friesenhahn
9319bd574a * libtiff/tif_dir.c (_TIFFVSetField): Add a special error case for
when the tag count value is zero.  Error handling is still a
regression since in 3.9.2, empty tags are skipped (with a warning)
rather than returning a hard error and refusing to read the file.

* tools/ppm2tiff.c (main): While case for parsing comment line
requires extra parenthesis to work as expected.  Reported by
Thomas Sinclair.
2010-04-10 19:22:34 +00:00
Frank Warmerdam
d85328cfc9 enable reading of very large strips in chunks (gdal #3514) 2010-04-02 19:26:22 +00:00
Frank Warmerdam
23532025ca use TIFFRewriteDirectory() in TIFFFlush() to migrate directories if needed 2010-03-31 06:40:10 +00:00
Frank Warmerdam
fda0494e8e change type of dec_bitsleft to uint64 to support 256MB+ strips (gdal #3512) 2010-03-30 17:02:57 +00:00
Bob Friesenhahn
4e0d97f83c * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so
that it is clearly a memory allocation error message, and also
includes the size of the allocation request.
2010-03-10 18:56:48 +00:00
Lee Howard
614095e3d0 * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR
strips.
        http://bugzilla.maptools.org/show_bug.cgi?id=2029
2010-02-22 19:24:39 +00:00
Lee Howard
4d1b67f0a0 Add bugzilla link. 2010-02-22 19:15:09 +00:00
Lee Howard
d473b19b31 * libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating
the JPEG TIFF as is is not required in order to prevent it from
        being unused and filled with invalid data.  (Leave it to be
        generated by later activity.)
        * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip
        data rather than skipping them.  This fixes the ability to view in
        Acrobat Reader, Evince, and Ghostscript.
2010-02-22 19:10:07 +00:00
Frank Warmerdam
bbef7fb9cb Made JPEGDecodeRaw() check for buffer overruns. Made so that when working
with downsampled images a stub function reporting an error is used for
tif_decoderow.  We cannot meaningfully support reading scanlines in this
situation.  (#1936)
2009-12-04 01:37:57 +00:00
Frank Warmerdam
e1b49e08af reset tif_scanlinesize after changes to upsampling ratios (#1936) 2009-12-04 01:21:52 +00:00
Frank Warmerdam
b7b6095407 fix resource leaks on error (#2125) 2009-11-30 18:42:53 +00:00
Frank Warmerdam
199977b6af Return to handling TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF
directory instead  of as a custom(generic) field to avoid a potential
reentrancy problem (#2125)
2009-11-30 18:19:15 +00:00
Frank Warmerdam
917274b864 Make TIFFDisplay argument in TIFFCIELabToRGBInit const, and display_sRGB static and const. 2009-11-30 12:22:26 +00:00
Bob Friesenhahn
d4038e39c5 * libtiff 4.0.0alpha5 released. 2009-11-04 17:49:25 +00:00