Michael Niedermayer
b1e242bc56
avcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()
...
Fixes: asan_double-free_d34593_861_smp3.wmv
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
80e42387dc
avcodec/g2meet: Clear pointers after deallocation
...
Fixes double free
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Janne Grunau
9eec23b8a7
g2meet: use av_ceil_log2 instead of a custom function
10 years ago
Janne Grunau
4ccccd6c40
g2meet: use an unsigned type for the djb hash
10 years ago
Kostya Shishkov
08c2d8f0aa
Go2Meeting decoder
...
ELS and ePIC decoder courtesy of Maxim Poliakovski,
cleanup and integration by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
b1b0baa3d6
avcodec/g2meet: Check init_get_bits8() return value
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
43e94d5af4
avcodec/g2meet: Use init_get_bits8()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Eric Zimmerman
eb31256f12
g2meet: Support G2M5 codec variant
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Diego Biurrun
bb815dfc38
g2meet: K&R formatting cosmetics
10 years ago
Diego Biurrun
4978850ca2
build: Split JPEG-related tables off into a separate component
10 years ago
Michael Niedermayer
2c22042aa0
avcodec/g2meet: Use av_mallocz_array() for framebuffer allocation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
2b5c1efa14
g2meet: check ff_set_dimensions return value
...
CC: libav-stable@libav.org
Bug-Id: CID 1135739
10 years ago
Michael Niedermayer
32e666c354
avcodec/g2meet: check tile dimensions to avoid integer overflow
...
Fixes out of array access
Fixes: asan_heap-oob_12a55d3_30_029.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Eric Zimmerman
4ba5420e4d
Added support for G2M5 codec
...
This has also been independently found and fixed similarly by carl in
f4a3bbf4a3cd375121ea2495817f3e50e831ed48
The 2nd magic check is taken from carls implementation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
14b4e64eab
g2meet: allow size changes within original sizes
11 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Diego Biurrun
e74433a8e6
dsputil: Split clear_block*/fill_block* off into a separate context
11 years ago
Diego Biurrun
cba4e6062a
More correct printf format specifiers
...
This avoids compiler warnings about argument and specifier type mismatch.
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Diego Biurrun
a801453423
g2meet: K&R formatting cosmetics
11 years ago
Michael Niedermayer
8b8ae298af
avcodec/g2meet: also reset local got_header when reseting the context got_header
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6b53c1aa82
avcodec/g2meet: fix error returns
...
Fixes out of array accesses
This should not affect any release
Fixes: 8ab69af9e5a7a7e20fe04cdd25c0d6e7-asan_heap-oob_e72b82_5505_cov_2278389485_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
77fbc03265
g2meet: validate bpp and bitmasks in the display info
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Kostya Shishkov
6477449243
g2meet: make JPEG tile decoder operate on 8x8 block mask
...
This is needed for upcoming Go2Meeting (G2M2/G2M3) decoder.
11 years ago
Maxim Poliakovski
d6d7851801
g2meet: factor out seeking to the chunk end
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Maxim Poliakovski
bc3f03567a
g2meet: rename FRAME_INFO to more appropriate DISPLAY_INFO
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
11 years ago
Maxim Poliakovski
ae95b2f810
g2meet: Validate bpp and bitmasks in the display info
...
That prevents processing of media files with
incompatible or unsupported settings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
3f826039dd
g2meet: factor out chunk seeking
...
This version requires fewer code and is safer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Maxim Poliakovski
cb2162adba
g2meet: Rename FRAME_INFO to more appropriate DISPLAY_INFO
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3af9d8269e
avcodec/g2meet: check the return code of ff_set_dimensions()
...
This is currently redundant as the checks before it are tighter than
the checks in ff_set_dimensions() but its more robust not to depend
on that.
Fixes CID1135739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alexandra Khirnova
9b8d11a76a
avcodec: Use av_reallocp where suitable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Kostya Shishkov
01f6df01b6
go2meeting: disallow tile dimensions that are not multiple of 16
...
Original decoder seems to always use 176x128 tiles anyway and this helps
avoiding lots of issues with odd tile sizes in fuzzed files.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Michael Niedermayer
6d9dad6a7c
avcodec/g2meet: check available space before copying palette
...
Fixes out of array read
Fixes: asan_heap-uaf_ae6067_5415_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
83f7bd6dcf
avcodec/g2meet: fix stride calculation, use correct format field
...
Fixes out of array accesses
Fixes: asan_heap-oob_ae5f63_5415_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
58c6239e85
g2meet: stop using deprecated avcodec_set_dimensions
11 years ago
Kostya Shishkov
4370f65be8
g2meet: Respect cursor_stride properly everywhere
...
This fixes a regression with rgb cursors since b1e46988
.
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Michael Niedermayer
c88ac1e023
avcodec/g2meet: fix regression with rgb cursors
...
Fixes Ticket2972
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e07ac727c1
avcodec/g2meet: Fix framebuf size
...
Currently the code can in some cases draw tiles that hang outside the
allocated buffer. This patch increases the buffer size to avoid out
of array accesses. An alternative would be to fail if such tiles are
encountered.
I do not know if any valid files use such hanging tiles.
Fixes Ticket2971
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
821a5938d1
avcodec/g2meet: Fix order of align and pixel size multiplication.
...
Fixes out of array accesses
Fixes Ticket2922
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
23bd0335af
avcodec/g2meet: remove redundant log message
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Martin Storsjö
b1e4698853
g2meet: Allocate cursor buffers large enough to fit the aligned width
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Michael Niedermayer
2960576378
avcodec/g2meet: fix src pointer checks in kempf_decode_tile()
...
Fixes Ticket2842
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
78b4bfdb84
Replace remaining obsolete PIX_FMT names with AV_PIX_FMT equivalents
12 years ago
Paul B Mahol
d64f3b72e0
replace some deprecated defines
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
3c4c5ca1c1
avcodec/g2meet: Check monochrome cursor width
...
Fixes out of array write
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7ad5708691
g2meet: Fix a typo in the height comparison
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Kostya Shishkov
7dfc3381dd
g2meet: do not leak buffers
12 years ago
Kostya Shishkov
4d960d7f60
g2meet: more graceful cursor loading
12 years ago
Kostya Shishkov
767ae86cee
g2meet: reset dimensions on header parsing errors
12 years ago
Michael Niedermayer
2d8f880a9b
g2meet: fix typo in height comparission
...
Fixes CID1030349
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago