Michael Niedermayer
f803635c4f
avcodec/faxcompr: Check for end of input in cmode == 1 in decode_group3_2d_line()
...
Fixes: Infinite loop
Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
ff56c139e0
avcodec/faxcompr: Check available bits in decode_uncompressed()
...
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112
Fixes: 34966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4587409334468608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years ago
Michael Niedermayer
7d8421e3d5
avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10
...
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years ago
Michael Niedermayer
08d2df4153
avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line()
...
Fixes: infinite loop
Fixes: 33674/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4816457818046464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years ago
Michael Niedermayer
7b3881f0da
avcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line()
...
Fixes: Timeout
Fixes: 32886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4779761466474496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years ago
Andreas Rheinhardt
f41f58f0a7
avcodec/faxcompr: Make ff_ccitt_unpack_init() thread-safe
...
This will allow to make the TIFF decoder's init function thread-safe.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Luca Barbato
73fc82f343
vlc: Add header #include when the types are used
...
Do not rely on indirectly including it from bitstream.h.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Alexandra Hájková
418ccdd703
faxcompr: Convert to the new bitstream reader
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Michael Niedermayer
d4a731b84a
avcodec/faxcompr: Add missing runs check in decode_uncompressed()
...
Fixes out of array access
Fixes: 54e488b9da4abbceaf405d6492515697/asan_heap-oob_32769b0_160_a8755eb08ee8f9579348501945a33955.TIF
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
012784052a
avcodec/faxcompr: negate uncompressed runs
...
Fixes remaining part of Ticket700
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
b2e95e012c
avcodec/faxcompr: Factor decode_uncompressed() out
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
a4f9bb228b
avcodec/faxcompr: Support uncompressed escapes in decode_group3_1d_line()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
38025e6898
avcodec/faxcompr: Support cmode == 9 && xxx == 7
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
bd2d4cc4a9
avcodec/faxcompr: Print the unsupported mode number
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Dyami Caliri
50833c9f7b
Fix buffer_size argument to init_put_bits() in multiple encoders.
...
Several encoders were multiplying the buffer size by 8, in order to get
a bit size. However, the buffer_size argument is for the byte size of
the buffer. We had experienced crashes encoding prores (Anatoliy) at
size 4096x4096.
10 years ago
Michael Niedermayer
424ed1a83e
avcodec/faxcompr: Fix memleak
...
Fixes CID1270816
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Paul B Mahol
134e8c73ea
avcodec/faxcompr: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Michael Niedermayer
713e62e91d
avcodec/faxcompr: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
a3b2b83f01
faxcompr: return meaningful errors
...
And optionally forward them to the caller instead of concealing them.
Unify err and ret in a single variable.
12 years ago
Luca Barbato
f32aefcf34
faxcompr: K&R formatting cosmetics
12 years ago
Michael Niedermayer
6f9ae391de
faxcompr: Dont read ref when the end has been reached in pass mode
...
Fixes reading over the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
98b7a50a21
tiffdec: Fix runend handling
...
Fixes Ticket1999
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5891e454a6
faxcompr: fix out of array read
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
438b86fed4
faxcompr: fix byte alignment case
...
Fixes Ticket1653
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
3a1ca240d9
ccitt fax: fix some group3 1d files without EOL
...
Fixes Ticket832
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
99a335299f
faxcompr: Check malloc results and unify return path
13 years ago
Martin Storsjö
e96b4a53df
vlc/rl: Add ff_ prefix to the nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
f6f95d4e49
doxygen: consistently place brief description
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
badce93dad
Simplify r20025: use align_get_bits instead of reimplementing it.
...
Originally committed as revision 20079 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Kostya Shishkov
a5568f4608
Make sure all the bits are written to output in fax data decoder.
...
This fixes decoding TIFF images with fax compression and width being not
multiple of eight (and issue 1429).
Originally committed as revision 20072 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Kostya Shishkov
d2cdf20147
cosmetics: reindent and reformat function declarations
...
Originally committed as revision 20066 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Kostya Shishkov
8da5d3dc37
Finally distinguish TIFF_CCITT_RLE and TIFF_G3 1-D case, so both of them
...
will be decoded correctly.
This fixes issue 1423.
Originally committed as revision 20065 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Kostya Shishkov
a8c7a3d2c1
Fix decoding of TIFF CCITT RLE compressed data.
...
This fixes issue 1417.
Originally committed as revision 20025 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
9106a698e7
Rename bitstream.h to get_bits.h.
...
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Stefano Sabatini
b275500706
Split bitstream.h, put the bitstream writer stuff in the new file
...
put_bits.h.
Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
bad5537e2c
Use full internal pathname in doxygen @file directives.
...
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.
Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
dc8a7c93d3
Add missing void keyword to parameterless function declarations.
...
Originally committed as revision 16860 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
a56f82eaf8
indent
...
Originally committed as revision 16348 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
537bf4266f
Simplify vertical mode
...
Originally committed as revision 16347 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
eb0094b224
And another sechole ...
...
Originally committed as revision 16346 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
268309750b
Fix yet another sechole.
...
Originally committed as revision 16345 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
11c5999e20
Fix another sechole.
...
Originally committed as revision 16344 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
2a522579aa
Minor simplification.
...
Originally committed as revision 16343 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
f78a679177
Remove unused run_start variable.
...
Originally committed as revision 16342 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
6f5c00eb9f
Move sync line pointers code to the end of the loop, it is simpler that way.
...
Originally committed as revision 16341 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
e3a54b6694
Get rid of check for condition that is always true (run_off < avctx->width).
...
Originally committed as revision 16340 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
43ba8f3545
Get rid of pix_left in the 2d code, it is simpler that way.
...
Originally committed as revision 16339 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago