Paul B Mahol
05df39cf3f
avcodec/tiff: check ff_lzw_decode_open() for failure
6 years ago
Michael Niedermayer
27f80ab016
avcodec/tiff: Update pointer only when the result is used
...
Fixes: runtime error: signed integer overflow: 538976288 * 32 cannot be represented in type 'int'
Fixes: 2310/clusterfuzz-testcase-minimized-4534784887881728
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
22a25ab389
avcodec/tiff: Fix leak of geotags[].val
...
Fixes: 2176/clusterfuzz-testcase-minimized-5908197216878592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
d7cbeab4c1
avcodec/tiff: Avoid loosing allocated geotag values
...
Fixes memleak
Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
98256595fa
avcodec/tiff: Clear deinvert_buf_size on deallocation
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
9221445fa0
avcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()
...
Fixes: Timeout
Fixes: 1213/clusterfuzz-testcase-minimized-6022987469815808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
f08122fbe0
avcodec/tiff: reset sampling[] if its invalid
...
Fixes divission by 0
Fixes: clusterfuzz-testcase-minimized-5592896440893440
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Muhammad Faiz
31f61b0d4f
avcodec: do not use AVFrame accessor
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
8 years ago
Michael Niedermayer
cd8e62746f
avcodec/tiff: Factor constant computation out of inner loop
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
3182e19c1c
avcodec/tiff: Check geotag count for being non zero
...
Fixes memleak
Fixes: 874/clusterfuzz-testcase-5252796175613952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
5d996b5649
avcodec/tiff: Check stripsize strippos for overflow
...
Fixes: 861/clusterfuzz-testcase-5688284384591872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
cfa10e11be
avcodec/tiff: Check palette shift
...
Fixes multiple runtime error: shift exponent 792 is too large for 32-bit type 'unsigned int'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
108b02e547
avcodec/tiff: Check for multiple geo key directories
...
Fixes memleak
Fixes: 826/clusterfuzz-testcase-5316921379520512
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
f48b6b8b91
avcodec/tiff: Perform multiply in tiff_unpack_lzma() as 64bit
...
This should make no difference as the value should not be able to be that large
but its more correct this way
Fixes CID1348138
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Andreas Cadhalpun
ed412d2850
tiff: fix overflows when calling av_reduce
...
The arguments of av_reduce are signed, so the cast to uint64_t is misleading.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Carl Eugen Hoyos
beb877bae0
lavc/tiff: Print compression debug information.
8 years ago
Michael Niedermayer
89f464e9c2
avcodec/tiff: Check subsample & rps values more completely
...
Fixes out of array access
Fixes: 83aedfb29af669c4d6e10f1bfad974d2/asan_heap-oob_1ab42fe_4984_9f6ec14462f8d8a00ea24b320572a963.tif
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
7727f76230
avcodec/tiff: Support uncompressed G3 CCITT fax
...
Fixes part of Ticket700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
dd1b4ed6d9
avcodec/tiff: Support uncompressed G4 CCITT fax
...
Fixes part of ticket700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
d5e9fc7821
avcodec/tiff: move bpp check to after "end:"
...
This ensures that all current and future code-pathes get bpp checked
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
ae5e1f3d66
tiff: Check that there is no aliasing in pixel format selection
...
Fixes possible issues with unexpected bpp/bppcount values.
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-8544
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Carl Eugen Hoyos
50144b91ea
Respect horizontal differencing predictor for 16bit gray tiff images.
...
Fixes ticket #4291 .
10 years ago
Paul B Mahol
f86f39cb9b
tiff: support decoding GBRP and GBRAP formats
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Carl Eugen Hoyos
3a3790b8f8
tiff: support encoding and decoding 64bit images
10 years ago
Matthew Oliver
293fee4bc2
libavcodec/tiff: Fix static linking of lzma with msvc.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e1c0cfaa41
avcodec/tiff: more completely check bpp/bppcount
...
Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6beea6f017
avcodec/tiff: fix odd dimensioned yuv
...
Fixes Ticket3893
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Benoit Fouet
4f10495055
tiff: fix {2,4}bpp grayscale palettes.
...
Create a default grayscale palette for 2 or 4 bpp grayscale tiff, if
there is no palette defined.
Fixes ticket #3915
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ab1e431288
avcodec/tiff: Make pixel format checks tighter
...
Fixes assertion failure with imgsrc001-lzma.tiff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
b140b51ebb
lavc/tiff: add support for LZMA compression
...
Derived from deflate code.
Requires liblzma.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
201a511bb9
lavc/tiff: add support for YUV deflate
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
b4231b4fed
lavc/tiff: move unpack_yuv() above the deflate functions
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
f0c0ae37c6
avcodec/tiff: Check that pix_fmt is a yuv variant for TIFF_PHOTOMETRIC_YCBCR
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6ea69a8ffa
avcodec/tiff: do not use photometric to detect pix_fmt
...
They should match but they do not always
Fixes assertion failure
no testcase with unmodified source available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Elio Pettenò
12640e4cbb
tiff: Return proper error for missing LZMA compression
...
The LZMA support is a semi-official extension supported by libtiff 4.0.0
and later.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Diego Elio Pettenò
2597a842a0
tiff: Improve grayscale support
...
Only use PAL8 if palette is present, else use GRAY8 for pixfmt.
Instead of simulating a grayscale palette, use real grayscale pixels, if no
palette is actually defined.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Carl Eugen Hoyos
60cbd6ad84
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
bcc5f69b33
tiff: support reading gray+alpha at 16 bits
10 years ago
Diego Biurrun
df507d5aa0
tiff: Replace deprecated PIX_FMT names by modern ones
10 years ago
Janne Grunau
a9f3f5fadb
Revert "tiff: support reading gray+alpha at 8 bits"
...
This reverts commit b31d76e45f
as it
uses an unkown pixel format.
10 years ago
Carl Eugen Hoyos
b31d76e45f
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
1e25afc181
avcodec/tiff: Support 410 and 440 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f694ca7ca7
avcodec/tiff: support 4:2:2 and 4:1:1 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d03defa778
avcodec/tiff: Support yuv 420 and 444
...
Fixes Ticket416
Trolled-by: jb
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1ca21e1b76
avcodec/tiff: parse subsample factors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8c88ea76df
avcodec/tiff: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a94de50ba0
avcodec/exif/exif_add_metadata: add support for SSHORT & SBYTE
...
No working testcase, this omission was just spoted when the parser apparently went out of
sync.
Reviewed-by; Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1dc2d4a8ef
avcodec/tiff: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago