Commit Graph

2612 Commits

Author SHA1 Message Date
Bob Friesenhahn
0056d44683 Consistently indent tiffFields. 2014-05-07 01:58:46 +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
3363eda09d Actually apply TIFF/EP tags I thought I had done earlier (bug #2457) 2014-04-02 17:23:06 +00:00
Bob Friesenhahn
65f22eacee Check return status from TIFFWriteScanline() correctly in test programs. 2013-12-17 14:41:57 +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
Lee Howard
e289d76bce Resolves a couple of buffer overflow issues pointed out by Pedro Ribeiro (pedrib@gmail.com). 2013-09-20 16:09:01 +00:00
Lee Howard
7b8ee1facf From: David Ryskalczyk <d235j.1@gmail.com>
Date: Thu, 18 Jul 2013 14:36:47 -0400

Here's a patch to correct an issue with creating G4-compressed PDFs.

The issue is caused by == being used to compare bitfields when only
one bit is intended to be compared. Some of the tiffs I have had both
T2P_CS_ICCBASED and T2P_CS_BILEVEL set; therefore, the current code
will fail, producing certain pages that are inverted.

The patch follows, and is also attached.

--David
2013-09-20 15:35:37 +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
2d7f2b7452 Push preliminary versions of new man page html files. 2012-07-29 16:16:04 +00:00
Tom Lane
45efaab395 Add new man pages to html/man/Makefile.am; also bmp2tiff.1.html. 2012-07-29 16:08:10 +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
06dac7192d Eliminate GCC 4.7.0 gripe about potential use of uninitialized data. 2012-07-07 14:43:17 +00:00
Bob Friesenhahn
c3e3173779 Used signed overflow checks rather than unsigned integer overflow checks since C language does not define signed overflow behavior 2012-07-06 23:24:46 +00:00
Bob Friesenhahn
39c8d4b160 Comment out set but not used variables which annoy GCC 4.7 2012-07-06 19:18:31 +00:00
Bob Friesenhahn
f8180e5811 Fix warning about comparing signed and unsigned type. 2012-07-06 18:48:04 +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
Tom Lane
8ed155dcc1 Fix raw_decode test so it works on big-endian machines.
The test case was ignoring the documented API for TIFFReadRGBATile,
namely that the output pixels are uint32's and the macros TIFFGetR etc
should be used to fetch the pixel components.

Original patch by Marcus Meissner, somewhat cleaned up by me.
2012-07-03 20:48:11 +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