Commit Graph

435 Commits

Author SHA1 Message Date
Frank Warmerdam
920688aac5 avoid uninitialized variable for degenerate files 2012-05-24 03:50:31 +00:00
Bob Friesenhahn
d766e7c5a0 * Update automake used to 1.11.3. 2012-02-18 21:58:02 +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
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
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
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
959042fdcf Fix spelling typo in tiff2ps. 2011-04-09 16:53:08 +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
91479f4d42 avoid leaks if TIFFRGBAImageBegin() fails (#2295) 2011-02-23 21:46:09 +00:00
Andrey Kiselev
d499ffbfcd Added support for specifying the compression level parameter (preset) for
Deflate and LZMA encoders, e.g "-c lzma:p1" or "-c zip:p9".
2010-12-23 13:38:47 +00:00
Bob Friesenhahn
9f3e08cf94 Needed to add tif_lzma.c to the Makefile. 2010-12-18 16:30:15 +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
Andrey Kiselev
1e3630f9fd Regenerate autotools stuff. 2010-12-14 12:54:53 +00:00
Andrey Kiselev
a2d72c2dd4 Implement a new TIFF compression scheme LZMA reserving a new value 34925 for
Compression tag. As per bug http://bugzilla.maptools.org/show_bug.cgi?id=2221
2010-12-14 12:52:59 +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
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
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
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
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
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
b3c5153919 If it doesn't fail, then it succeeds. 2010-11-28 15:35:12 +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
Lee Howard
01ff8dfe99 More improvements from Richard Nolde. 2010-11-26 23:26:46 +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
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
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
004e0bab6d Tiny formatting fixes to improve code navigation. 2010-07-02 11:06:29 +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
e3538640b6 C files should not use C++ style comments. 2010-06-21 19:09:26 +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
75f7f78120 various fixes for tiff2pdf (#2211) 2010-06-13 19:25:54 +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
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
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
Frank Warmerdam
13ab8a93b6 added -x switch to tiffcp to (re)number allt he pages (#2203) 2010-06-03 17:01:01 +00:00