1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00
Commit Graph

88557 Commits

Author SHA1 Message Date
Michael Niedermayer
2258982c8b avcodec/dstdec: Check read_table() for failure
Fixes: Timeout (too long -> 42sec)
Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03ea8d8cd4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:47 +01:00
Michael Niedermayer
e0d167051e avcodec/snowenc: Set mb_num to avoid ratecontrol floating point divisions by 0.0
Fixes: Ticket7990

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 55279d699f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:47 +01:00
Michael Niedermayer
0c9ad1c746 avcodec/snowenc: Fix 2 undefined shifts
Fixes: Ticket7990

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8802e329c8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:47 +01:00
Michael Niedermayer
f4103876f9 avformat/nutenc: Do not pass NULL to memcmp() in get_needed_flags()
This compared to the other suggestions is cleaner and easier to understand
keeping the condition in the if() simple.

This affects alot of fate tests.

See: [FFmpeg-devel] [PATCH 05/11] avformat/nutenc: Don't pass NULL to memcmp
See: [FFmpeg-devel] [PATCH]lavf/nutenc: Do not call memcmp() with NULL argument

Fixes: Ticket 7980

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4fdeb3fce)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:47 +01:00
Michael Niedermayer
eda9406895 avcodec/aacdec_template: Check samplerate
Fixes: signed integer overflow: 2 * 1881153568 cannot be represented in type 'int'
Fixes: 17996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5687126468853760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7730bacb41)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:47 +01:00
Michael Niedermayer
a154ec5f43 avcodec/truemotion2: Fix several integer overflows in tm2_low_res_block()
Fixes: signed integer overflow: 1077952576 + 1355863565 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5679842317565952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b655f55ea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
64b961273a avcodec/utils: Check block_align
Fixes: out of array access
Fixes: 18432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5675574936207360
Fixes: 18326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5071752362721280
Fixes: 18384/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV1_fuzzer-5769439500304384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f011572e66)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
2635bfb2b3 avcodec/wmalosslessdec: Fix some integer anomalies
Fixes: left shift of negative value -341180
Fixes: 18401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5686380134400000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d3dee676b8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
7369aa201e avcodec/adpcm: Fix invalid shifts in ADPCM DTK
Fixes: left shift of negative value -1
Fixes: 18397/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_DTK_fuzzer-5675653487132672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 34e701ff93)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
132e4e5460 avcodec/apedec: Only clear the needed buffer space, instead of all
Fixes: Timeout (15sec -> 0.4sec)
Fixes: 18396/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5730080487112704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f17ea02001)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
490f931494 avcodec/libvorbisdec: Fix insufficient input checks leading to out of array reads
Fixes: 16144/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVORBIS_fuzzer-5638618940440576
Fixes: out of array read

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 069be4aa5d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
a1d6813649 avcodec/g723_1dec: fix invalid shift with negative sid_gain
Fixes: left shift of negative value -1
Fixes: 18395/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G723_1_fuzzer-5710313034350592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1850c3feaa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
68274f568e avcodec/vp5: Check render_x/y
Fixes: Timeout (15sec -> 91ms)
Fixes: 18353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP5_fuzzer-5704150326706176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 698e042c77)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
7b0ad24b10 avcodec/qdrw: Check input for header/skiped space before get_buffer()
Fixes: Timeout (21sec -> 0.8sec)
Fixes: 17990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDRAW_fuzzer-5200374436200448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b63fbc19c0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
4ed397df65 avcodec/ralf: Skip initializing unused filter variables
Fixes: left shift of negative value -1
Fixes: 17890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5643307467669504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f4ecf6c39d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
e02dedf267 avcodec/takdec: Fix overflow with large sample rates
Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int'
Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 42eb78059d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
09e942aa4d avcodec/alsdec: Check that input space for header exists in read_diff_float_data()
Fixes: Timeout (21sec -> 8sec)
Fixes: 17832/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5737092172218368

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 09581f7923)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
b3d6eabd78 avformat/pjsdec: Check duration for overflow
Fixes: signed integer overflow: -3 - 9223372036854775807 cannot be represented in type 'long'
Fixes: 17828/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5645915116797952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1efaac6932)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
8d483f9849 avcodec/ptx: Check that the input contains at least one line
Fixes: Timeout (19sec -> 44ms)
Fixes: 17816/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PTX_fuzzer-5704459950227456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a6ad328256)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
958cc68d51 avcodec/alac: Fix integer overflow in LPC
Fixes: signed integer overflow: 2147483628 + 128 cannot be represented in type 'int'
Fixes: 17783/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5146470595952640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 44b73a0568)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
b58e7868f2 avcodec/smacker: Fix integer overflows in pred[] in smka_decode_frame()
Fixes: signed integer overflow: -2147481503 + -32732 cannot be represented in type 'int'
Fixes: 17782/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-5769672225456128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a76897e19c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
08972bff12 avcodec/aliaspixdec: Check input size against minimal picture size
Fixes: Timeout (15sec -> 72ms)
Fixes: 17774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALIAS_PIX_fuzzer-5193929107963904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8c69310477)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
8d7d6066ef avcodec/ffwavesynth: Fix integer overflows in pink noise addition
Fixes: signed integer overflow: -1795675744 + -1926578528 cannot be represented in type 'int'
Fixes: 17741/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5131336402075648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7916b6863c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
0dc659b8fb avcodec/vc1_block: Fixes integer overflow in vc1_decode_i_block_adv()
Fixes: signed integer overflow: 62220 * 262144 cannot be represented in type 'int'
Fixes: 17145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5667394743173120

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6fdeb20817)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
c992a8301a avcodec/wmalosslessdec: Check block_align
Fixes: NULL pointer dereference
Fixes: 18331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5652847445671936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1c799271e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
f628f38f6e avcodec/g729postfilter: Fix left shift of negative value
Fixes: Ticket8176

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5f0acc5064)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
7c7e103729 avcodec/binkaudio: Check sample rate
Fixes: signed integer overflow: 1092624416 * 2 cannot be represented in type 'int'
Fixes: 18045/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_RDFT_fuzzer-5718519492116480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2fca09bce4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
22336d5c48 avcodec/adpcm: Check initial predictor for ADPCM_IMA_EA_EACS
Fixes: signed integer overflow: -2147483360 - 631 cannot be represented in type 'int'
Fixes: 17701/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_EA_EACS_fuzzer-5711517319692288

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2f66e8436d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
888df4b68c avcodec/g723_1dec: Fix overflow in shift
Fixes: shift exponent 1008 is too large for 32-bit type 'int'
Fixes: 17700/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G723_1_fuzzer-5707633436131328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 07732f12a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
0041d3ceba avcodec/apedec: Fix integer overflow in predictor_update_3930()
Fixes: signed integer overflow: -69555262 * 31 cannot be represented in type 'int'
Fixes: 17698/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5728970447781888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5c072c9ed7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
4b4c26ca09 avcodec/g729postfilter: Fix undefined intermediate pointers
Fixes: index -49 out of bounds for type 'int16_t [192]'
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c61661a2c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
d998b81ce1 avcodec/g729postfilter: Fix undefined shifts
Fixes: left shift of negative value -12
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6a4fdbf112)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
6d62dbb46b avcodec/lsp: Fix undefined shifts in lsp2poly()
Fixes: left shift of negative value -30635
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b93f52cd6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
6b85dc6569 avcodec/adpcm: Fix left shifts in AV_CODEC_ID_ADPCM_EA
Fixes: left shift of negative value -1
Fixes: 17683/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_EA_R2_fuzzer-5111690013704192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8695fbec57)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
3ba68a5400 avformat/shortendec: Check k in probe
Fixes: Assertion failure
Fixes: 17640/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5708767475269632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ea770eb559)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
386b987f2a avfilter/vf_geq: Use av_clipd() instead of av_clipf()
With floats we cannot represent all 32bit integer dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8813b1a98)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
25a917e46f avcodec/wmaprodec: Check that the streams channels do not exceed the overall channels
Fixes: NULL pointer dereference
Fixes: 18075/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5708262036471808
Fixes: 18087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5740627634946048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e418b315dd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
34905f7219 avcodec/qdmc: Check input space in qdmc_get_vlc()
Fixes: Timeout (125sec -> 0.4sec)
Fixes: 18059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDMC_fuzzer-5656195825664000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2c7975fe6f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
5577079473 avcodec/pcm: Check bits_per_coded_sample
Fixes: shift exponent -2 is negative
Fixes: 17736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F16LE_fuzzer-5742815929171968
Fixes: 17998/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F24LE_fuzzer-5716980383875072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5de19160a3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
d109b2d41d avcodec/exr: Allow duplicate use of channel indexes
Fixes: Ticket #8203

Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 080819b3b4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
60c8cf09df avcodec/fitsdec: Fail on 0 naxisn
Fixes: Timeout (100+ sec -> 23ms)
Fixes: 17769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5678314672357376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4a3303d520)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
4b7829bf9c avcodec/ituh263dec: Check input for minimal frame size
Fixes: Timeout (28sec -> 3sec)
Fixes: 17559/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H263_fuzzer-5681050776240128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7f0498ed46)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
c388edef74 avcodec/truemotion1: Check that the input has enough space for a minimal index_stream
Fixes: Timeout (18sec -> 0.4sec)
Fixes: 17585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION1_fuzzer-5117015135617024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4a660fac98)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
f83710ee4b avformat/mpsubdec: Clear queue on error
Fixes: Memleaks
Fixes: 17219/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5720539124989952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9a0d36e562)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
9462ca109f avcodec/sunrast: Check that the input is large enough for the maximally compressed image
Fixes: Timeout (17sec -> 15ms)
Fixes: 17224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SUNRAST_fuzzer-5663218491457536
Fixes: 17224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SUNRAST_fuzzer-5735590015795200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bf0ba75c4a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
3e5316bf2f avcodec/sunrast: Check for availability of maplength before allocating image
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 711ad71aea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
a7e147c856 avformat/subtitles: Check nb_subs in ff_subtitles_queue_finalize()
Fixes: null pointer dereference
Fixes: 17828/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5645915116797952
Fixes: Ticket8147

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 81b53913bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
d458cfdcca avcodec/wmaprodec: Check if there is a stream
Fixes: null pointer dereference
Fixes: signed integer overflow: 512 * 2147483647 cannot be represented in type 'int'
Fixes: 17809/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5634409947987968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9b533de28e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
29f07606b6 avcodec/g2meet: Check for end of input in jpg_decode_block()
Fixes: Timeout (100sec -> 0.7sec)
Fixes: 8668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5174143888130048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 61dd2e07be)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00
Michael Niedermayer
8ca3bf37ab avcodec/g2meet: Check if adjusted pixel was on the stack
This basically checks if a pixel that was coded with prediction
and residual could have been stored using a previous case.
This avoids basically a string of 0 symbols stored in less than
50 bytes to hit a O(n²) codepath.

Fixes: Timeout (too slow to wait -> immediately)
Fixes: 8668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-4895946310680576

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9c84c162e9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-15 12:25:46 +01:00