Even Rouault
0f88612e3e
TIFFWriteEncodedStrip/TIFFWriteEncodedTile: fix rewriting of LZW-compressed data
...
Fixes https://github.com/OSGeo/gdal/issues/1439
When rewriting a LZW tile/strip whose existing size is very close to a multiple of
1024 bytes (and larger than 8192 bytes) with compressed data that is larger,
the new data was not placed at the end of the file, causing corruption.
2019-04-11 21:00:56 +02:00
Even Rouault
f9fc01c331
Merge branch 'bug2848' into 'master'
...
tif_luv.c: LogLuvSetupEncode() error must return 0
See merge request libtiff/libtiff!72
2019-04-08 08:18:30 +00:00
Thomas Bernard
a18ef87a5a
build/gitlab-ci: fix typo
2019-04-03 14:56:33 +02:00
Thomas Bernard
cce0a85e6f
show test-suite.log in gitlab-ci
...
useful when build fails
2019-04-03 14:55:46 +02:00
Thomas Bernard
57c112bfa9
Add output check for tiff2ps
...
note : the reference files have been generated in master branch
2019-04-03 14:55:29 +02:00
Even Rouault
bf35895107
tif_read.c: potentially fix false positive from Coverity Scan. CID 1400288
2019-03-23 11:31:10 +01:00
Even Rouault
12ae83914e
tif_read.c: potentially fix false positive from Coverity Scan. CID 1400271
2019-03-23 11:30:18 +01:00
Even Rouault
b6b2f1ff5b
tif_zip.c: remove dead code. CID 1400360
2019-03-23 11:25:44 +01:00
Even Rouault
301463dacf
tif_webp.c: remove false positive warning about dereference before null check. CID 1400255
2019-03-23 11:24:50 +01:00
Even Rouault
f4b7eb7cd3
tif_pixarlog.c: remove dead code. CID 1400342
2019-03-23 11:21:24 +01:00
Even Rouault
c12b6a2a39
tif_pixarlog.c: avoid false positive Coverity Scan warnings about overflow. CID 1400300 and 1400367
2019-03-23 11:20:18 +01:00
Even Rouault
d0358fdbc3
tif_lzw.c: silence CoverityScan false positive. CID 1400355
2019-03-23 11:16:22 +01:00
Even Rouault
07f939bf59
tif_luv.c: silence CoverityScan false positive. CID 1400231, 1400251, 1400254, 1400272, 1400318, 1400356
2019-03-23 11:09:42 +01:00
Even Rouault
dd2dfe1d6a
TryChopUpUncompressedBigTiff(): avoid potential division by zero. master only. GDAL Coverity CID 1400263
2019-03-23 11:05:49 +01:00
Thomas Bernard
1fb9e731ef
tif_luv.c: LogLuvSetupEncode() error must return 0
...
see http://bugzilla.maptools.org/show_bug.cgi?id=2848
if wrongly returning 1, the processing of incorrect file continues,
which causes problems.
2019-03-22 12:17:28 +01:00
Thomas Bernard
933575f505
add a test for fax2tiff tool
2019-03-22 10:06:01 +01:00
Thomas Bernard
ea2e933b17
tiff2pdf.c: don't call t2p_tile_collapse_left() when buffer size is wrong
...
see http://bugzilla.maptools.org/show_bug.cgi?id=2785
2019-02-28 13:44:49 +01:00
Thomas Bernard
9a926b2d89
Advertise https://libtiff.gitlab.io/libtiff/ as mirror
...
I'm put it above the maptools.org mirror because
Even Rouault believe at some point it will be completely removed
2019-02-28 13:32:27 +01:00
Even Rouault
e3d738277b
Merge branch 'bug_2826' into 'master'
...
tiff2pdf.c: check colormap pointers when loading CMYK with colormap
See merge request libtiff/libtiff!65
2019-02-28 12:30:20 +00:00
Thomas Bernard
b7d479cf8b
tiff2pdf.c: check colormap pointers
...
Avoid access to non initialized pointers
http://bugzilla.maptools.org/show_bug.cgi?id=2826
2019-02-28 13:05:19 +01:00
Even Rouault
621b54a0b5
Merge branch 'fix_warnings' into 'master'
...
tiff2ps.c: fix warning caused by integer promotion
See merge request libtiff/libtiff!68
2019-02-27 21:00:33 +00:00
Thomas Bernard
05029fb7f1
PSDataColorContig(): avoid heap buffer overrun
...
fixes http://bugzilla.maptools.org/show_bug.cgi?id=2844
each iteration of the loop read nc bytes
2019-02-24 00:50:12 +01:00
Thomas Bernard
a242136916
tiff2ps.c: fix warning caused by integer promotion
...
uint8 value is promoted to int in (value << 24) so -fsanitize
yield runtime errors :
tiff2ps.c:2969:33: runtime error: left shift of 246 by 24 places cannot be represented in type 'int'
2019-02-22 16:23:33 +01:00
Even Rouault
3c792f726b
Merge branch 'large_strile_improvements' into 'master'
...
Large strile support improvements
See merge request libtiff/libtiff!63
2019-02-22 10:48:51 +00:00
Even Rouault
c8b6bdc680
Merge branch 'gitlab-pages' into 'master'
...
ci: Add pages job
See merge request libtiff/libtiff!45
2019-02-21 18:26:06 +00:00
Even Rouault
27124e9148
Merge branch 'issue_2833' into 'master'
...
tiffcp.c: check that (Tile Width)*(Samples/Pixel) do no overflow
See merge request libtiff/libtiff!60
2019-02-19 14:39:26 +00:00
Even Rouault
6947b21a4f
Merge branch 'issue_2831' into 'master'
...
tiffcrop.c: fix invertImage() for bps 2 and 4
See merge request libtiff/libtiff!61
2019-02-19 14:36:59 +00:00
Even Rouault
0224f7d4f2
Merge branch 'issue_2842' into 'master'
...
move _TIFFClampDoubleToFloat() to tif_aux.c
See merge request libtiff/libtiff!62
2019-02-19 14:31:35 +00:00
Even Rouault
2ff9c01bd9
tif_zip.c: allow reading and writing strips/tiles with more than 4 GB of compressed or uncompressed data
2019-02-19 15:10:36 +01:00
Even Rouault
0489f1f879
tif_dirread.c: when strip chopping is enabled, extend this mechanism to multi-strip uncompressed files with strips larger than 2GB to expose them as strips of ~500 MB
2019-02-19 15:10:00 +01:00
Even Rouault
28f67ba4bd
Merge branch 'size_t_typo' into 'master'
...
CMakeLists.txt: fix TIFF_SIZE_T
See merge request libtiff/libtiff!59
2019-02-19 13:56:12 +00:00
Thomas Bernard
8420a31e8c
move _TIFFClampDoubleToFloat() to tif_aux.c
...
the same function was declared in tif_dir.c and tif_dirwrite.c
see http://bugzilla.maptools.org/show_bug.cgi?id=2842
2019-02-12 16:04:28 +01:00
Thomas Bernard
9cfa5c4691
tiffcrop.c: fix invertImage() for bps 2 and 4
...
too much bytes were processed, causing a heap buffer overrun
http://bugzilla.maptools.org/show_bug.cgi?id=2831
the loop counter must be
for (col = 0; col < width; col += 8 / bps)
Also the values were not properly calculated. It should be
255-x, 15-x, 3-x for bps 8, 4, 2.
But anyway it is easyer to invert all bits as 255-x = ~x, etc.
(substracting from a binary number composed of all 1 is like inverting
the bits)
2019-02-11 23:08:25 +01:00
Thomas Bernard
7cc76e9bc4
tiffcp.c: use INT_MAX
2019-02-11 21:42:03 +01:00
Thomas Bernard
2b0d0e6997
check that (Tile Width)*(Samples/Pixel) do no overflow
...
fixes bug 2833
2019-02-11 10:05:33 +01:00
Thomas Bernard
2201714e88
CMakeLists.txt: fix TIFF_SIZE_T
2019-02-03 14:13:54 +01:00
Even Rouault
ae0bed1fe5
Merge branch 'master' into 'master'
...
Fix for simple memory leak that was assigned CVE-2019-6128.
See merge request libtiff/libtiff!50
2019-02-02 14:46:05 +00:00
Even Rouault
933784a10a
Merge branch 'bug2835' into 'master'
...
tiff2ps: fix heap-buffer-overflow
See merge request libtiff/libtiff!53
2019-02-02 14:32:58 +00:00
Even Rouault
38ede78b13
Fix warning (use of uninitialized value) added per d0a842c5db
(fixes https://gitlab.com/libtiff/libtiff/merge_requests/54#note_137742985 )
2019-02-02 15:30:14 +01:00
Yuri Aksenov
88b410f800
fix fax2tiff
...
see http://bugzilla.maptools.org/show_bug.cgi?id=2799
fixes d9bc8472e7
2019-02-02 15:14:54 +01:00
Even Rouault
cee7c07789
Merge branch 'tiffcrop' into 'master'
...
tiffcrop: shut up clang warnings
See merge request libtiff/libtiff!52
2019-02-02 12:11:01 +00:00
Even Rouault
329433af90
Merge branch 'bug2833' into 'master'
...
TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing
See merge request libtiff/libtiff!54
2019-02-01 20:31:04 +00:00
Even Rouault
8d966dfbe2
Merge branch 'gitignore' into 'master'
...
add test/ files to .gitignore
See merge request libtiff/libtiff!56
2019-02-01 20:28:46 +00:00
Even Rouault
1edeee44c8
Merge branch 'master' into 'master'
...
tif_dir: unset transferfunction field if necessary (CVE-2018-19210)
See merge request libtiff/libtiff!47
2019-02-01 20:21:02 +00:00
Thomas Bernard
578f3f4600
add test/ files to .gitignore
2019-01-29 16:37:09 +01:00
Thomas Bernard
802d3cbf30
TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing
...
http://bugzilla.maptools.org/show_bug.cgi?id=2833
we must check the pointer is not NULL before memcmp() the memory
2019-01-29 11:21:47 +01:00
Thomas Bernard
309bfd7f61
tiff2ps: fix heap-buffer-overflow
...
http://bugzilla.maptools.org/show_bug.cgi?id=2834
usually the test (i < byte_count) is OK because the byte_count is divisible by samplesperpixel.
But if that is not the case, (i + ncomps) < byte_count should be used, or
maybe (i + samplesperpixel) <= byte_count
2019-01-29 10:47:14 +01:00
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