eeef4189a4
avcodec/h264idct_template: Fix integer overflow in ff_h264_chroma422_dc_dequant_idct()
...
Fixes: signed integer overflow: -2105540608 - 2105540608 cannot be represented in type 'int'
Fixes: 26870/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5656647567147008
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 51dfd6f1bd
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
783ff18bea
avformat/dsfdec: Check block_align more completely
...
Fixes: infinite loop
Fixes: 26865/clusterfuzz-testcase-minimized-ffmpeg_dem_DSF_fuzzer-5649473830912000
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 65b8974d54
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
40ad3111be
avformat/mpc8: Check remaining space in mpc8_parse_seektable()
...
Fixes: Fixes infinite loop
Fixes: 26704/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6327056939614208
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 4f66dd13d0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
b9ea0689ea
avformat/id3v2: Sanity check tlen before alloc and uncompress
...
Fixes: Timeout (>20sec -> 65ms)
Fixes: 26896/clusterfuzz-testcase-minimized-ffmpeg_dem_DAUD_fuzzer-5691024049176576
Fixes: 27627/clusterfuzz-testcase-minimized-ffmpeg_dem_AEA_fuzzer-4907019324358656
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 d7f87a4b9e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
6acd99576b
avformat/vqf: Check len for COMM chunks
...
Fixes: Infinite loop
Fixes: 26696/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-5648269168082944
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 a834af133b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
c1f7a4153e
avformat/mov: Avoid overflow in end computation in mov_read_custom()
...
Fixes: signed integer overflow: 18 + 9223372036854775799 cannot be represented in type 'long'
Fixes: 26731/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5696846019952640
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 7d75ecf8d2
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
57c535996e
avcodec/hevc_cabac: Limit value in coeff_abs_level_remaining_decode() tighter
...
The max depth is 16bps, the max allowed coefficient depth is depth+6
Fixes: signed integer overflow: 1074266112 + 1073725439 cannot be represented in type 'int'
Fixes: 26493/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5657763331702784
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 7cf852b03c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
1121985dbd
avformat/cafdec: Check the return code from av_add_index_entry()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9dc3301745
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
c15e4b5a20
avformat/cafdec: Check for EOF in index read loop
...
Fixes: OOM
Fixes: 27398/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-541296033975500
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 eb46939e3a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
aa4d9952c9
avformat/cafdec: Check that bytes_per_packet and frames_per_packet are non negative
...
These fields are not signed in the spec (1.0) so they cannot be negative
Changing bytes_per_packet to unsigned would not solve this as it is exported
as block_align which is signed
Fixes: Infinite loop
Fixes: 26492/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5632087614554112
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 5eed718087
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
61c4d6963f
avformat/mpc8: correct integer overflow in mpc8_parse_seektable()
...
Fixes: signed integer overflow: -4683718486770919638 * 2 cannot be represented in type 'long'
Fixes: 26704/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6327056939614208
Fixes: 27550/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6259212652642304
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 0897402ac8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
d2af5614ff
avformat/mpc8: correct 32bit timestamp truncation
...
Fixes: left shift of 65536 by 15 places cannot be represented in type 'int'
Fixes: 26801/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-5164313092030464
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 ad3e495657
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
a53ffb15d8
avcodec/exr: Check ymin vs. h
...
Fixes: out of array access
Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344
Fixes: 27443/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5631239813595136
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 3e5959b345
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
16654970c6
avformat/avs: Use 64bit for the avio_tell() output
...
Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long'
Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824
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 1278f117d7
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
76db6abd3d
avformat/wavdec: More complete size check in find_guid()
...
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long'
Fixes: 27341/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5442833206738944
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 a207df2acb
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
7612e1b4e5
avcodec/mv30: Use unsigned in idct_1d()
...
Fixes: signed integer overflow: 2110302399 + 39074947 cannot be represented in type 'int'
Fixes: 27330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5664923153334272
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 2eb6417417
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
e0c1af04b2
avformat/iff: Check size before skip
...
Fixes: Infinite loop
Fixes: 27292/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5731168991051776
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 8b50e8bc29
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
aa11e4c712
avformat/rmdec: Check for EOF in index packet reading
...
Fixes: Timeout(>10sec -> 1ms)
Fixes: 27284/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6304211110985728
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 ebf4bc629e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
1dfa422f73
avcodec/vp3dsp: Use unsigned constant to avoid undefined integer overflow in ff_vp3dsp_set_bounding_values()
...
Fixes: signed integer overflow: 64 * 33686018 cannot be represented in type 'int'
Fixes: 26911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-4904975073017856
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 c7e775f712
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
aed96e94c7
avformat/icodec: Check for zero streams and stream creation failure
...
Fixes: NULL pointer dereference
Fixes: 26814/clusterfuzz-testcase-minimized-ffmpeg_dem_ICO_fuzzer-5758487797432320
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 b33233bd53
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
a151a64925
avformat/icodec: Factor failure code out in read_header()
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 27ee67c00f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
87ec4e09b8
avformat/bintext: Check width
...
Fixes: division by 0
Fixes: 26780/clusterfuzz-testcase-minimized-ffmpeg_dem_ADF_fuzzer-5117945027756032
Fixes: 26998/clusterfuzz-testcase-minimized-ffmpeg_dem_ADF_fuzzer-5119352359354368
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 f6dc285fb5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
a0c75b800f
avformat/sbgdec: Check that end is not before start
...
Fixes: signed integer overflow: -9223372036854775808 + -5279949906739200 cannot be represented in type 'long'
Fixes: 26908/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6329610851319808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9ef60a66f1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
04f802e729
avformat/lvfdec: Check stream_index before use
...
Fixes: assertion failure
Fixes: 26905/clusterfuzz-testcase-minimized-ffmpeg_dem_LVF_fuzzer-5724267599364096.fuzz
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 b1d99ab14f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
5917653ebd
avformat/au: cleanup on EOF return in au_read_annotation()
...
Fixes: memleak
Fixes: 26841/clusterfuzz-testcase-minimized-ffmpeg_dem_AU_fuzzer-5174166309044224
Regression since: e680d50eb4
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
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 d16974c3dd
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
0040f0f11b
avformat/mpegts: Limit copied data to space
...
Fixes: out of array access
Fixes: 26816/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-6282861159907328.fuzz
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 79cf7c7191
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
14e4f69fba
avformat/bintext: Check width in idf_read_header()
...
Fixes: division by 0
Fixes: 26802/clusterfuzz-testcase-minimized-ffmpeg_dem_IDF_fuzzer-5180591554953216.fuzz
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 442d53f409
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
4a6325c69c
avformat/iff: check size against INT64_MAX
...
Bigger sizes are misinterpreted as negative numbers by the API
Fixes: infinite loop
Fixes: 26611/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4890614975692800
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 f291cd681b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
4f0bdff292
avformat/vividas: improve extradata packing checks in track_header()
...
Fixes: out of array accesses
Fixes: 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640
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 27a99e2c7d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
7347b84404
avformat/paf: Check for EOF in read_table()
...
Fixes: OOM
Fixes: 26528/clusterfuzz-testcase-minimized-ffmpeg_dem_PAF_fuzzer-5081929248145408
Fixes: 26584/clusterfuzz-testcase-minimized-ffmpeg_dem_PAF_fuzzer-5172661183053824
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 437b7302b0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
a5e11c8a8b
avformat/gxf: Check pkt_len
...
Fixes: Infinite loop
Fixes: 26576/clusterfuzz-testcase-minimized-ffmpeg_dem_GXF_fuzzer-4823080360476672
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 dad9a86ca7
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
d96cf0e324
avformat/aiffdec: Check packet size
...
Fixes: Fixes infinite loop
Fixes: 26575/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5727522236661760
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0ba71a72d3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
43e4849226
avformat/concatdec: use av_strstart()
...
Fixes: out array read
Fixes: 26610/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5631838049271808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Reviewed-by: Nicolas George <george@nsup.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2610acb49a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
8b4378adf0
avformat/wavdec: Refuse to read chunks bigger than the filesize in w64_read_header()
...
Fixes: OOM
Fixes: 26414/clusterfuzz-testcase-minimized-ffmpeg_dem_FWSE_fuzzer-5070632544632832
Fixes: 26475/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5770207722995712
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 7b2244565a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
672b1883f1
avformat/rsd: Check size and start before computing duration
...
Fixes: signed integer overflow: 100794754 * 28 cannot be represented in type 'int'
Fixes: 26474/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-5181797606096896
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 c79d8a6851
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
bd79a4e0ec
avformat/vividas: better check of current_sb_entry
...
This is the simplest fix for the problem, it is possible to instead check
this when the variables are set and propagate errors and then fail earlier
Fixes: out of array access
Fixes: 26490/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5723367078100992
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 b848baef0d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
cd733f1c88
avformat/iff: More completely check body_size
...
Fixes: infinite loop
Fixes: 26485/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5126561373880320
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 3588e2e6b0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
7bfa801811
avformat/vividas use avpriv_set_pts_info()
...
Fixes: assertion failure
Fixes: 26482/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-4905102324006912
Fixes: 26491/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6002953141616640
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 d5c42b8c08
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
a0db3ad5d5
avformat/xwma: Check for EOF in dpds_table read code
...
Fixes: Timeout (>30 -> 140ms)
Fixes: 26478/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-5918147066200064
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 44b18a76b8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
4b080eaf2b
avcodec/utils: Check sample rate before use for AV_CODEC_ID_BINKAUDIO_DCT in get_audio_frame_duration()
...
Fixes: shift exponent 95 is too large for 32-bit type 'int'
Fixes: 26590/clusterfuzz-testcase-minimized-ffmpeg_dem_SMACKER_fuzzer-5120609937522688
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ec7e0d4288
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
7f23553234
avcodec/dirac_parser: do not offset AV_NOPTS_OFFSET
...
Fixes: signed integer overflow: -9223372036854775807 - 48000 cannot be represented in type 'long long'
Fixes: 26521/clusterfuzz-testcase-minimized-ffmpeg_dem_DIRAC_fuzzer-5635536506847232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 343c3149ab
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
949a565a2d
avformat/rmdec: Make expected_len 64bit
...
Fixes: signed integer overflow: 1347551268 * 14 cannot be represented in type 'int'
Fixes: 26458/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5655364324032512
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 728330462c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
e5c9bae371
avformat/pcm: Check block_align
...
Fixes: signed integer overflow: 321 * 8746632 cannot be represented in type 'int'
Fixes: 26461/clusterfuzz-testcase-minimized-ffmpeg_dem_PVF_fuzzer-6326427831762944
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 b23a619c13
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
529af35ade
avformat/lrcdec: Clip timestamps
...
Fixes: signed integer overflow: 7111111111111531010 - -7335632962598013506 cannot be represented in type 'long'
Fixes: 26463/clusterfuzz-testcase-minimized-ffmpeg_dem_LRC_fuzzer-6015558333759488
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 80bc2ac3c0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
e06e86f092
avutil/mathematics: Use av_sat_add64() for the last addition in av_add_stable()
...
Fixes: signed integer overflow: 9223372036854770375 + 5450 cannot be represented in type 'long'
Fixes: 26471/clusterfuzz-testcase-minimized-ffmpeg_dem_MXG_fuzzer-6229617557635072
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 ac8cebd48e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
933c330de6
avformat/electronicarts: Check for EOF in each iteration of the loop in ea_read_packet()
...
Fixes: timeout(>20sec -> 1ms)
Fixes: 26526/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-5672328069120000
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 857aba7c45
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
3f458f329b
avformat/ifv: Check that total frames do not overflow
...
Fixes: Infinite loop
Fixes: 26392/clusterfuzz-testcase-minimized-ffmpeg_dem_GIF_fuzzer-5713658237419520
Fixes: 26435/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6548251853193216
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 b990148d1e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
6f268dadf8
avcodec/vp9dsp_template: Fix some overflows in iadst8_1d()
...
Fixes: signed integer overflow: 190587 * 11585 cannot be represented in type 'int'
Fixes: 26407/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5086348408782848
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 bca0735be5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
5371e38134
avcodec/fits: Check bscale
...
Fixes: division by 0
Fixes: 26208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-6270472117026816
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 c2ccd76fd0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00
84a6958423
avformat/nistspheredec: Check bps
...
Fixes: left shift of 1111111190 by 3 places cannot be represented in type 'int'
Fixes: 26437/clusterfuzz-testcase-minimized-ffmpeg_dem_NISTSPHERE_fuzzer-4886896091856896
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 7c144b363e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-02-02 14:18:21 +01:00