Michael Niedermayer
cd460f4da0
avcodec/hnm4video: Optimize postprocess_current_frame()
...
Improves: Timeout (220sec -> 108sec)
Improves: 15570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HNM4_VIDEO_fuzzer-5085482213441536
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
9af8ce754b
avcodec/hnm4video: Forward errors of decode_interframe_v4()
...
Fixes: Timeout (108sec -> 160ms)
Fixes: 15570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HNM4_VIDEO_fuzzer-5085482213441536
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Marton Balint
4c501bafc0
avcodec/hnm4video: fix palette alpha
...
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
57ed5a64fe
hnm4: change width/height to int to fix hypothetical integer overflows
...
CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
10 years ago
Luca Barbato
16158da960
hnm4: Use av_image_check_size
...
As done for all the other codecs not calling it indirectly.
CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
10 years ago
Michael Niedermayer
4d7d9a5782
avcodec/hnm4video: check offset before subtraction in decode_interframe_v4a()
...
Fixes out of array read
Fixes: signal_sigsegv_1326a09_1752_cov_245452111_GRTH301.HNS
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e23b18321f
avcodec/hnm4video: change width/height to int
...
Fixes hypothetical integer overflows
Related to CID1135770 & CID1135771
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
321b338762
avcodec/hnm4video: allocate frame only when theres a coded frame
...
Fixes memleak
Fixes: asan_heap-oob_e76bdf_2224_MOTHOO.HNM
This patch also removes the setting of palette_has_changed,
which was set on a frame that was never returned
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ffe31c654d
avcodec/hnm4video: check writeoffset in decode_interframe_v4a()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bd8d28e2d2
avcodec/hnm4video: check dimensions for validity
...
Fixes out of array read
Fixes: asan_heap-oob_e76e18_1244_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b33f3246e2
avcodec/hnm4video: fix missing newlines in error messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
78446f0d9d
avcodec/hnm4video: fix write offset checks in decode_interframe_v4()
...
Fixes: asan_heap-oob_e76a51_1244_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5a08ba5381
avcodec/hnm4video: check offset in decode_interframe_v4() more completely
...
Fixes out of array reads
Fixes: signal_sigsegv_e74c1e_1092_BROCIME.HNM
Fixes: signal_sigsegv_e74e85_2620_PLAQUE0.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0398b7cbd3
avcodec/hnm4video: check intraframe size
...
Fixes hypothetical integer overflow with HNM4_CHUNK_ID_IZ
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ba992711f7
avcodec/hnm4video: check that packetsize is at least 8
...
Fixes integer overflow and assertion failure
Fixes: signal_sigabrt_7ffff7126425_1243_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
315e3cf047
avcodec/hnm4video: remove redundant log message
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
David Kment
9af7a8523a
HNM4/HNM4A demuxer & video decoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago