Commit Graph

3339 Commits

Author SHA1 Message Date
Chris Degawa
16377d39ea
mingw-w64 cmake: Don't find libm
mingw-w64 will provide libm symbols by default without -lm and mingw-64's
libm is just a stub.

This is just to make sure that on systems with msys2 and also cygwin, cmake
doesn't find a libm that actually contains math functions.
2020-02-26 23:03:32 +00:00
Even Rouault
06d6e36187 Merge branch 'division-by-zero' into 'master'
tools/tiffcp.c: fix potential division by zero

See merge request libtiff/libtiff!83
2020-02-26 21:37:54 +00:00
Even Rouault
bf53c80aea Merge branch 'fix-unused-warning' into 'master'
warnings: mark conditionally used parameters

See merge request libtiff/libtiff!49
2020-02-26 21:31:27 +00:00
Even Rouault
a1b7eac5e8 Merge branch 'master' into 'master'
fix issue #78 warnings regarding RichTIFFIPTC data type

Closes #78

See merge request libtiff/libtiff!99
2020-02-26 21:25:42 +00:00
Even Rouault
e3f0b1d894 Merge branch 'win64-handle-casts-warn-fix' into 'master'
Avoid warnings about casts between HANDLE and int in Win64 builds

Closes #2

See merge request libtiff/libtiff!93
2020-02-26 21:23:57 +00:00
Even Rouault
2a4d9b4fab Merge branch 'bug2839' into 'master'
raw2tiff: avoid divide by 0

Closes #151

See merge request libtiff/libtiff!103
2020-02-26 21:22:26 +00:00
Even Rouault
2832b9829f Merge branch 'bug2669' into 'master'
tiff2pdf: palette bound check in t2p_sample_realize_palette()

Closes #82

See merge request libtiff/libtiff!104
2020-02-26 21:21:09 +00:00
Even Rouault
e9a124f52f Merge branch 'int-shift' into 'master'
tiffcrop: fix asan runtime error caused by integer promotion

See merge request libtiff/libtiff!105
2020-02-26 21:20:10 +00:00
Even Rouault
a7276b9198 Merge branch 'bug-2538' into 'master'
libtiff.html: fix function casing

Closes #68

See merge request libtiff/libtiff!107
2020-02-26 21:17:27 +00:00
Thomas Bernard
bdcf1add10
raw2tiff: avoid divide by 0
fixes #151 / http://bugzilla.maptools.org/show_bug.cgi?id=2839

first memcmp() lines before computing corellation
and always avoid divide by 0 anyway
2020-02-16 19:20:37 +01:00
Even Rouault
b4820b2179 Merge branch 'bug2855' into 'master'
tiff2ps: fix heap buffer read overflow in PSDataColorContig()

Closes #161

See merge request libtiff/libtiff!102
2020-02-09 13:11:39 +00:00
Thomas Bernard
8c9dca34be libtiff.html: fix function casing 2020-02-08 18:02:15 +01:00
Thomas Bernard
2cdc041d62
libtiff.html: fix function casing
fixes #68 / http://bugzilla.maptools.org/show_bug.cgi?id=2538
2020-02-08 17:54:51 +01:00
Thomas Bernard
4f168b7368
tiffcrop: fix asan runtime error caused by integer promotion
tiffcrop.c:4027:20: runtime error: left shift of 190 by 24 places cannot be represented in type 'int'

C treats (byte << 24) as an int expression.
casting explicitely to unsigned type uint32 avoids the problem.

the same issue has been fixed elsewhere with a242136916

I detected the bug with the test file of #86
2020-02-08 13:43:35 +01:00
Thomas Bernard
3107393354
tiff2pdf: palette bound check in t2p_sample_realize_palette()
fixes #82
2020-02-08 13:27:51 +01:00
Thomas Bernard
ebf0864306
tiff2ps: fix heap buffer read overflow in PSDataColorContig()
fixes #161 / http://bugzilla.maptools.org/show_bug.cgi?id=2855

in 05029fb7f1 I missed that 1 extra byte is read
in this loop.
2020-02-08 12:10:56 +01:00
Even Rouault
3334704ebc
tif_dirread.c: suppress CLang static Analyzer 9.0 false positive 2020-02-06 01:25:03 +01:00
Even Rouault
37a02ad493
TIFFSetupStrips: enforce 2GB limitation of Strip/Tile Offsets/ByteCounts arrays
TIFFWriteDirectoryTagData() has an assertion that checks that the
arrays are not larger than 2GB. So error out earlier if in that situation.
2020-02-01 18:11:11 +01:00
Bob Friesenhahn
7a335a32eb Simplify nmake configuration for building port directory. Now there
is only one boolean setting to enable building strtoll() and strtoull()
port functions.  The boolean setting enables the necessary port files
to be built, but the remainder of the logic is via pre-processor code
in the common tif_config.h, which was prepared before entering the
port directory to do a build.
2020-01-29 08:03:39 -06:00
Bob Friesenhahn
ed3b07c4e2 Make sure that tif_config.h is produced prior to entering the port
directory and add an include path so that the port files can include
tif_config.h.  Do not actually include tif_config.h at this time
since CMake and Autotools builds are not prepared for that.  This
issue could be handled by updating the CMake and Autotools builds
or by adding a define which directs libport.h to include tif_config.h.
2020-01-28 08:16:05 -06:00
Bob Friesenhahn
550f8708d2 Fix nmake build mistakes in my last commit:
tif_config.vc.h:

  Always define HAVE_STRTOL/HAVE_STRTOUL.
  Define HAVE_STRTOLL/HAVE_STRTOULL if _MSC_VER >= 1900.

nmake.opt:

  Provide defaults suitable for MSVC prior to 14.0.

libport.h:

  The sense of the pre-processor logic was inverted from what it
  should be.  The intention is to only provide the prototype if the
  function is missing.
2020-01-26 19:17:23 -06:00
Bob Friesenhahn
58b16f47a8 Add nmake build support for manually configuring the 'port' files to be
built based on MSVC features.
Include tif_config.h in tools/tiffset.c.
2020-01-25 14:11:05 -06:00
Even Rouault
f5e1d765eb
Adjust previous fix to avoid undue warning in some situations triggered by GDAL 2020-01-23 20:40:53 +01:00
Even Rouault
3db0ff91bc
_TIFFPartialReadStripArray: bring back support for non-conformant SLONG8 data type
Such as in https://github.com/OSGeo/gdal/issues/2165
2020-01-12 14:54:02 +01:00
Even Rouault
8192df23fa
test: add test for single-strip OJPEG file without RowsPerStrip tag (like in CR2 files) 2020-01-07 23:41:26 +01:00
Even Rouault
0a8245b7b8
OJPEGReadHeaderInfo: if rowsperstrip not defined, then assume one-single-strip. Complementary fix to 0356ea76ba 2020-01-07 23:13:11 +01:00
Angel Sánchez
1fc1faa5a9 fix issue #78 warnings regarding RichTIFFIPTC data type 2019-12-16 13:12:20 +01:00
Even Rouault
4f6db6a129
contrib/oss-fuzz/build.sh: fix broken if construct 2019-12-14 12:03:43 +01:00
Even Rouault
b52fb8a91d
contrib/oss-fuzz/build.sh: other attempt at fixing build failure 2019-11-28 14:18:38 +01:00
Even Rouault
ad25410d09
contrib/oss-fuzz/build.sh: install liblzma-dev for x86_64 builds 2019-11-20 12:04:31 +01:00
Even Rouault
6927706c57
contrib/oss-fuzz/build.sh: install liblzma-dev:i386 on i386 builds 2019-11-17 12:58:30 +01:00
Even Rouault
4ef21c27c9 Merge branch 'cmake-parse' into 'master'
CMake: simplify parsing variables from configure

See merge request libtiff/libtiff!98
2019-11-15 22:02:02 +00:00
Rolf Eike Beer
47b1d516d3 CMake: simplify parsing variables from configure 2019-11-15 10:45:47 +01:00
Even Rouault
4159bda6db
contrib/oss-fuzz/build.sh: fix ossfuzz build by statically linking to lzma 2019-11-14 15:12:43 +01:00
Even Rouault
d73aaf0757 Merge branch 'fix_ojpeg_172' into 'master'
OJPEG: fix broken sanity check added in 4.1.0 (#fixes 172)

See merge request libtiff/libtiff!97
2019-11-12 14:55:53 +00:00
Even Rouault
0356ea76ba
OJPEG: fix broken sanity check added in 4.1.0, and add two OJPEG test files 2019-11-11 23:07:57 +01:00
Even Rouault
f417f056c5
test/: add missing generated .sh files 2019-11-11 23:01:03 +01:00
Even Rouault
d0a8a3262c Merge branch 'fix-missing-checks-TIFFGetField-tiffcrop' into 'master'
adds missing checks on TIFFGetField in tiffcrop tool

Closes #170

See merge request libtiff/libtiff!96
2019-11-04 21:14:38 +00:00
Bug Checkers
47656ccb3f adds missing checks on TIFFGetField in tiffcrop tool (fixes #170) 2019-11-04 21:14:38 +00:00
Even Rouault
91d4a30dbc Merge branch 'adds-missing-TIFFClose-rgb2ycbcr' into 'master'
adds a missing TIFFClose in rgb2ycbcr tool

See merge request libtiff/libtiff!95
2019-11-04 20:04:20 +00:00
Mansour Ahmadi
f2f1289601 adds a missing TIFFClose in rgb2ycbcr tool 2019-11-04 14:48:13 -05:00
Bob Friesenhahn
e0d707dc15 libtiff 4.1.0 released 2019-11-03 14:15:37 -06:00
Bob Friesenhahn
9700cdfa77 ChangeLog updated with latest git commits. 2019-11-03 14:00:24 -06:00
Bob Friesenhahn
0cbdf1f903 Added a step for updating the legacy ChangeLog file. 2019-11-03 13:48:37 -06:00
Bob Friesenhahn
73975cbcb2 Ignore emacs temporary files (ending with tilde character). 2019-11-03 13:47:08 -06:00
Bob Friesenhahn
014441b770 Added release summary page for the 4.1.0 release. 2019-11-03 13:31:26 -06:00
Bob Friesenhahn
f18e1a2db5 Fix Cmake HAVE_GETOPT for systems which declare getopt in stdio.h.
Fix utility baked-in getopt prototype which appears when HAVE_GETOPT is not defined.
2019-11-03 11:21:26 -06:00
Bob Friesenhahn
aeb87392ad Fax2tiff.sh needs to remove its output file in advance. Syntax changes so that bash is not required. 2019-11-03 09:55:14 -06:00
Even Rouault
0219b01b54
tif_jpeg.c: extra cast to silence Coverity warning. GDAL CID 1406475 2019-10-26 22:45:36 +02:00
Even Rouault
8bf7b73703
tif_jpeg.c: fix warning added by previous commit (on 32bit builds) 2019-10-23 16:54:38 +02:00