Michael Niedermayer
ab834b8f36
avcodec/g2meet: ask for sample with overflowing RGB
...
Suggested-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
4dd2c8b9ea
avcodec/g2meet: Check RGB upper limit
...
Fixes: runtime error: left shift of 1876744317 by 16 places cannot be represented in type 'int'
Fixes: 6799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5115274731716608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
0a47451458
avcodec/g2meet: Change order of operations to avoid undefined behavior
...
Fixes: signed integer overflow: 65280 * 196032 cannot be represented in type 'int'
Fixes: 7279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5977332473921536
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
0bd0401336
avcodec/elsdec: Fix memleaks
...
Fixes: 6798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5135899701542912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
3981fb8d2a
avcodec/g2meet: Check tile dimensions with av_image_check_size2()
...
Fixes: OOM
Fixes: 6216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-4983807968018432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Martin Vignali
cbbec68847
libavcodec/blockdsp : add AVX version
...
Also modify the required alignment, to 32 instead of 16
for several codecs
Signed-off-by: James Almer <jamrial@gmail.com>
7 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
dcc39ee10e
lavc: Remove deprecated XvMC support hacks
...
Deprecated in 11/2013.
8 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Alexandra Hájková
799703c3ea
g2meet: Convert to the new bitstream reader
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Diego Biurrun
67deba8a41
Use avpriv_report_missing_feature() where appropriate
8 years ago
Carl Eugen Hoyos
144ef773c7
Use correct msvc type specifiers for ptrdiff_t and size_t.
9 years ago
Michael Niedermayer
030c7f0309
avcodec/g2meet: Check for ff_els_decode_bit() failure in epic_decode_run_length()
...
Fixes invalid shift
Fixes: g2m_left_shift_2.wmv
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
3a4d369ea4
g2m: Relax resolution change constraints
...
Do not fail when original resolution is smaller than current one,
as the frame buffer is resized automatically.
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
9 years ago
Michael Niedermayer
fb04666995
avcodec/g2meet: Also clear tile dimensions on header_fail
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
71ec8e1ed6
avcodec/g2meet: Fix potential overflow in tile dimensions check
...
Fixes CID1322351
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
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>
9 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
10 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