James Almer
84357c09ef
avcodec/x86/pngdsp: add missing emms at the end of add_png_paeth_prediction
...
Fixes unpredictable behavior with floats.
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 57a29f2e7d )
2025-09-15 23:48:56 -03:00
Michael Niedermayer
e98a6be89b
Update for 4.2.11
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:01:16 +02:00
Michael Niedermayer
9ae2d3646b
avcodec/takdec: Check remaining space for first predictors
...
Fixes: Timeout
Fixes: 403673829/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5498240154009600
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 8e6db875af )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:02 +02:00
Michael Niedermayer
abd06f81c8
avcodec/sonic: Check num_taps
...
The encoder uses max 128 taps, which is quiet a lot already
If work is done to improve sonic, it will be more radical than changing the taps
Fixes: Timeout
Fixes: 402539974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-6122944271286272
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 fd0a792766 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:01 +02:00
Michael Niedermayer
329cd64a24
avformat/mov: reject negative ELST durations
...
Fixes: multiple integer overflows
Fixes: 401016767/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6242067591790592
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 9fc2702f6f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:01 +02:00
Michael Niedermayer
c52f0d2e0f
avcodec/h264_mb: Fix tmp_cr for arm
...
When decoding a bitstream with weighted-bipred enabled,
the results on ARM and x86 platforms may differ.
The reason for the inconsistency is that the value of
STRIDE_ALIGN differs between platforms. And STRIDE_ALIGN
is set to the buffer stride of temporary buffers for U
and V components in mc_part_weighted.
If the buffer stride is 32 or 64 (as on x86 platforms),
the U and V pixels can be interleaved row by row without
overlapping, resulting in correct output.
However, on ARM platforms where the stride is 16,
the V component did overwrite part of the U component's pixels,
leading to incorrect predicted pixels.
The bug can be reproduced by the following bitstream.
https://trac.ffmpeg.org/attachment/ticket/11357/inter_weighted_bipred2.264
Fixes: ticket 11357
Commit-msg-mostly-by: Bin Peng <pengbin@visionular.com >
Reviewed-by: Bin Peng <pengbin@visionular.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 74fd2c3ddb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:01 +02:00
Michael Niedermayer
fef450f3c5
avcodec/vorbisdec: Dont treat overread as error
...
This differs from libvorbis by
stddev: 2.44 PSNR: 88.58 MAXDIFF: 41 bytes: 834304/ 834304
for the file from the ticket
Fixes: Ticket11427
Regression since: dc89cf804a
This is a similar solution to what james proposed earlier in
[FFmpeg-devel] [PATCH] avcodec/vorbisdec: don't abort on EOD when decoding residuals
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit fd5a3c5fed )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:00 +02:00
Michael Niedermayer
d553897a10
libpostproc: check minimum size
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 917c15435a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:00 +02:00
Michael Niedermayer
47d7bd31a9
avformat/hls: add fmp4 to allowed_extensions
...
Fixes: yt-dlp/issues/12700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d82016c730 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 19:00:00 +02:00
Michael Niedermayer
b5657755b5
avformat/hls: Add ec3 to allowed_extensions
...
Fixes part of Ticket11435
Fixes: Elisa Viihde (Finnish online recording service)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 68644994fd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:59 +02:00
Michael Niedermayer
9dd7ab049f
avformat/hls: Add cmfv and cmfa to allowed_extensions
...
Fixes: www.nicovideo.jp
Fixes: Ticket11526
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2352145e41 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:59 +02:00
Michael Niedermayer
237e877883
configure: Clearer documentation for "disable-safe-bitstream-reader"
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 979608dde7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:59 +02:00
Michael Niedermayer
b3f9eac35a
swscale/output: Fix integer overflow in yuv2gbrp_full_X_c()
...
Fixes: signed integer overflow: 1966895953 + 210305024 cannot be represented in type 'int'
Fixes: 391921975/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5916798905548800
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 ce538ef97a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:58 +02:00
James Almer
eb88a2318e
avcodec/libtheora: fix setting keyframe_mask
...
t_info.keyframe_granule_shift is set to the library default of 6, which is ok
for gop sizes up to 63. Since there's apparently no way to query the updated
value after having forced a gop value with TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE,
calculate it manually instead.
Fixes ticket #11454 .
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 22aa71d4da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:58 +02:00
James Almer
20dee7be59
avfilter/buffersrc: check for valid sample rate
...
A sample rate <= 0 is invalid.
Fixes an assert in ffmpeg_enc.c that assumed a valid sample rate would be set.
Fixes ticket #11385 .
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 1446e37d3d )
2025-05-16 18:59:57 +02:00
Michael Niedermayer
3c34ce7cfe
doc: replace http/git by https urls
...
These are more secure
Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b4d165c68f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:57 +02:00
Lynne
4b61be93b8
configure: update copyright year
...
On 01/01/2025 19:05, Peter Ross wrote:
> FFmpeg turns 25 this year.
(cherry picked from commit d3aa99a4f4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:57 +02:00
Cosmin Stejerean
de0ec0d3af
avfilter/bwdif: account for chroma sub-sampling in min size calculation
...
The current logic for detecting frames that are too small for the
algorithm does not account for chroma sub-sampling, and so a sample
where the luma plane is large enough, but the chroma planes are not
will not be rejected. In that event, a heap overflow will occur.
This change adjusts the logic to consider the chroma planes and makes
the change to all three bwdif implementations.
Fixes #10688
Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at >
Reviewed-by: Thomas Mundt <tmundt75@gmail.com >
Signed-off-by: Philip Langdale <philipl@overt.org >
(cherry picked from commit 737ede405b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:56 +02:00
Michael Niedermayer
1e0f85a54d
avformat/iff: Check that we have a stream in read_dst_frame()
...
Fixes: null pointer dereference
Fixes: 385644864/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4551049565765632
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 8668957ef6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:56 +02:00
Michael Niedermayer
b847a91cd0
avformat/mlvdec: fix size checks
...
Fixes: heap-buffer-overflow
Fixes: 391962476/clusterfuzz-testcase-minimized-ffmpeg_dem_MLV_fuzzer-5746746587676672
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 251d43aef0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:56 +02:00
Michael Niedermayer
2ad73fc12c
avformat/mxfdec: Check edit unit for overflow in mxf_set_current_edit_unit()
...
Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long'
Fixes: 392672068/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6232335892152320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8a6ad9eab2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:55 +02:00
Michael Niedermayer
9d5b967325
avcodec/h263dec: Check against previous dimensions instead of coded
...
Fixes: out of array access
Fixes: crash-a41ef3db699013f669b076f02f36942925f5a98c
Found-by: Kacper Michajlow <kasper93@gmail.com >
Reviewed-by: Kacper Michajlow <kasper93@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0fe33c99a2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:55 +02:00
Michael Niedermayer
6b4205c95e
avformat/mxfdec: Check avio_read() success in mxf_decrypt_triplet()
...
Fixes: Use of uninitialized memory
Fixes: 71444/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5448597561212928
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 6ecc96f4d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:55 +02:00
Michael Niedermayer
c5fac74428
avcodec/huffyuvdec: Initialize whole output for decode_gray_bitstream()
...
Fixes: use of uninitialized memory
Fixes: 375286238/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-6352546854141952
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 ef71552cf9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:54 +02:00
Michael Niedermayer
f8fda20ba6
avformat/ipmovie: Check signature_buffer read
...
Fixes: use of uninitilaized data
Fixes: 385167047/clusterfuzz-testcase-minimized-ffmpeg_dem_IPMOVIE_fuzzer-5941477505564672
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 788abe0d25 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:54 +02:00
Michael Niedermayer
abb4a151ef
avformat/wtvdec: Initialize buf
...
ff_parse_mpeg2_descriptor() reads over what is initialized
Fixes: use of uninitialized memory
Fixes: 383825645/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5144130618982400
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 17b019c517 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:54 +02:00
Michael Niedermayer
e2aac02c48
avcodec/cbs_vp9: Initialize VP9RawSuperframeIndex
...
Fixes: use-of-uninitialized-value
Fixes: 70907/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_METADATA_fuzzer-6339363208757248
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 e81d410242 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 18:59:46 +02:00
Michael Niedermayer
a4c09cf37a
avformat/vqf: Check avio_read() in add_metadata()
...
Fixes: use of uninitialized data
Fixes: 383825642/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5380168801124352
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 c43dbecbda )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:50 +02:00
Michael Niedermayer
e029108cea
avformat/dashdec: Check whitelist
...
Fixes: CVE-2023-6602, V. DASH Playlist SSRF
Found-by: Harvey Phillips of Amazon Element55 (element55)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4c96d6bf75 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:50 +02:00
Michael Niedermayer
a6599d5108
avutil/avstring: dont mess with NULL pointers in av_match_list()
...
Fixes: applying zero offset to null pointer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c6c54943d1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:49 +02:00
Michael Niedermayer
a18b0ddf50
avcodec/mpegvideo_enc: Check FLV1 resolution limits
...
Found-by: Elias Myllymäki <elias.myllymaki04p@gmail.com >
Reviewed-by: Alexander Strasser <eclipse7@gmx.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 827c073154 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:49 +02:00
Michael Niedermayer
5a9ca53ac2
avcodec/ffv1enc: Fix handling of 32bit unsigned symbols
...
This may be needed for floats
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Alexander Strasser <eclipse7@gmx.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 402824e9e9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:49 +02:00
Michael Niedermayer
977ced3323
avcodec/vc1dec: Clear block_index in vc1_decode_reset()
...
Fixes: 377965565/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-4504434689769472
Fixes: out of array access
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 251de1791e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:48 +02:00
Michael Niedermayer
eef4ca9a67
avcodec/aacsbr_template: Clear n_q on error
...
Fixes: index 5 out of bounds for type 'uint8_t [5]'
Fixes: 377748135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5167109774049280
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 3f029bfb7f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:48 +02:00
Michael Niedermayer
d67d0175db
swscale/output: Fix undefined overflow in yuv2rgba64_full_X_c_template()
...
Fixes: signed integer overflow: -1082982400 + -1195645138 cannot be represented in type 'int'
Fixes: 376136843/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4791844321427456
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 56faee21c1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:48 +02:00
Michael Niedermayer
6b43edeb24
avfilter/af_pan: Fix sscanf() use
...
Fixes: Memory Data Leak
Found-by: Simcha Kosman <simcha.kosman@cyberark.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b5b6391d64 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:47 +02:00
Michael Niedermayer
12c9288d47
avformat/rmdec: check that buf if completely filled
...
Fixes: use of uninitialized value
Fixes: 70988/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5298245077630976
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9578c135d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:47 +02:00
Michael Niedermayer
66402ac52e
avcodec/hapdec: Clear tex buffer
...
The code following makes no attempt to initialize all of the buffer
Fixes: use of uninitialized value
Fixes: 70980/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5329909059223552
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 7eeeda703b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:47 +02:00
Michael Niedermayer
777a03ebab
avformat/mxfdec: Check that key was read sucessfull
...
Fixes: use of uninitialized value
Fixes: 70932/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4870202133643264
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 4c62cbcae2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:46 +02:00
Michael Niedermayer
72c8f46cb0
avformat/rpl: Fix check for negative values
...
Fixes: signed integer overflow: 10 * -1923267925333400000 cannot be represented in type 'int64_t' (aka 'long')
Fixes: 378891963/clusterfuzz-testcase-minimized-fuzzer_loadfile_direct-5714338935013376
Found-by: ossfuzz
Reported-by: Kacper Michajlow <kasper93@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit eab65379bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:46 +02:00
Michael Niedermayer
50456eb8d4
avformat/mlvdec: Check avio_read()
...
Fixes: use-of-uninitialized-value
Fixes: 383170476/clusterfuzz-testcase-minimized-ffmpeg_dem_MLV_fuzzer-4696002884337664
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 bb85423142 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:45 +02:00
Michael Niedermayer
d53cf41505
avcodec/utils: Fix block align overflow for ADPCM_IMA_WAV
...
Fixes: signed integer overflow: 529008646 * 8 cannot be represented in type 'int'
Fixes: 383379145/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6674045107503104
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 9327093079 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:45 +02:00
Michael Niedermayer
50f46db70d
avformat/matroskadec: Check pre_ns for overflow
...
Fixes: signed integer overflow: -3483479120376300096 - 7442323944145700864 cannot be represented in type 'long'
Fixes: 383187489/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4561470580391936
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 361d24e6d9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:45 +02:00
Michael Niedermayer
c8fbdc5c6f
avcodec/webp: Check ref_x/y
...
Fixes: 70991/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WEBP_fuzzer-5544067620995072
Fixes: use of uninintailized value
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 7c1e732ad2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:44 +02:00
Michael Niedermayer
9df3db27d5
avcodec/ilbcdec: Initialize tempbuff2
...
Fixes: Use of uninitialized value
Fixes: 71350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-6322020827070464
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 4482218440 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:44 +02:00
Michael Niedermayer
ce9505775a
avformat/dxa: check bpc
...
Fixes: integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 373971762/clusterfuzz-testcase-minimized-ffmpeg_dem_DXA_fuzzer-4880491112103936
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 7e020f2141 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:44 +02:00
Michael Niedermayer
201f2c5912
swscale/slice: clear allocated memory in alloc_lines()
...
Fixes: use of uninitialized memory in hScale16To15_c()
Fixes: 373924007/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5841199968092160
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 aeec39f3c1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:43 +02:00
Michael Niedermayer
f7dda674af
avformat/icodec: fix integer overflow with nb_pal
...
Fixes: runtime error: signed integer overflow
Fixes: 42536949/clusterfuzz-testcase-minimized-fuzzer_loadfile-6199846684393472
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Tested-by: Kacper Michajlow
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 84569b6c22 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:43 +02:00
Michael Niedermayer
6a638d42cc
doc/developer: Document relationship between git accounts and MAINTAINERS
...
This should have been documented long ago and i thought it was
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7051825b01 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:43 +02:00
Michael Niedermayer
f9eaf66e26
avformat/vividas: Check avio_read() for failure
...
Fixes: use of uninitialized value (untested)
Fixes: 42537627/clusterfuzz-testcase-minimized-fuzzer_loadfile_direct-5505802505355264
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 96d45c3b21 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:42 +02:00
Michael Niedermayer
3dec911f86
avformat/ilbc: Check avio_read() for failure
...
Fixes: use of uninitialized value
Fixes: 42537627/clusterfuzz-testcase-minimized-fuzzer_protocol_memory-6656646223298560-cut
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e30d957a9b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:42 +02:00
Michael Niedermayer
5d945a7243
avformat/nistspheredec: Clear buffer
...
Fixes: use-of-uninitialized-value
Fixes: 42537627/clusterfuzz-testcase-minimized-fuzzer_protocol_memory-6515855798632448-cut
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 898f6582eb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:42 +02:00
Michael Niedermayer
a59f0a1ad2
INSTALL: explain the circular dependency issue and solution
...
Sponsored-by: Sovereign Tech Fund
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit df00705e00 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:41 +02:00
Michael Niedermayer
9b48ac2f85
avformat/mpegts: Initialize predefined_SLConfigDescriptor_seen
...
Fixes: use of uninitialized variable
Fixes: 368729566/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTS_fuzzer-6044501804646400
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 db7b4fc89f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:41 +02:00
Michael Niedermayer
da697059f4
avformat/mxfdec: Fix overflow in midpoint computation
...
Fixes: signed integer overflow: 4611686016549392399 + 9223372033098784800 cannot be represented in type 'long long'
Fixes: 368503277/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5928227458056192
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 23088a5ff2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:41 +02:00
Michael Niedermayer
f2e8fbb7ff
avcodec/rangecoder: only perform renorm check/loop for callers that need it
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d147b3d7ec )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:40 +02:00
Michael Niedermayer
bcee885d18
avcodec/ffv1dec: Fix end computation with ec=2
...
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 10e5af15bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:40 +02:00
Michael Niedermayer
c093968c9b
avcodec/ffv1enc: Prevent generation of files with broken slices
...
Fixes: Ticket5548
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b7ff66a358 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:40 +02:00
Michael Niedermayer
e0c3272988
avformat/matroskadec: Check desc_bytes so bits fit in 64bit
...
Likely a tighter check can be done
Fixes: signed integer overflow: 3305606804154370442 * 8 cannot be represented in type 'long'
Fixes: 70449/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4771166007918592
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 c4122406f6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:39 +02:00
Michael Niedermayer
f60e83c0d8
avcodec/ffv1enc: Correct error message about unsupported version
...
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 556c767786 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:39 +02:00
Michael Niedermayer
70d61dcf2d
avcodec/ffv1enc: Slice combination is unsupported
...
We always write minimal slices, the size calculation is wrong in some
corner cases but as its always 1x1 (minus1) we can for now just hard-code it
This helps with ticket 5548
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7d514655bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:39 +02:00
Michael Niedermayer
6a5fa843b2
avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
...
"Fixes" Ticket7063
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 417b163c00 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:38 +02:00
Michael Niedermayer
9768c6e27d
avcodec/ffv1enc: Fix >8bit context size
...
Fixes: Ticket5405
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a9c83e43f2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:38 +02:00
Michael Niedermayer
27a484de3a
avcodec/xan: Add basic input size check
...
Fixes: Timeout
Fixes: 71739/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XAN_WC3_fuzzer-6170301405134848
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpe
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 56bef2fd58 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:38 +02:00
Michael Niedermayer
a07629c6f5
avcodec/svq3: Check for minimum size input
...
Fixes: Timeout
Fixes: 71295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-4999941125111808
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 050b5e85cb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:37 +02:00
Michael Niedermayer
fdc673fada
avcodec/eacmv: Check input size for intra frames
...
Fixes: Timeout
Fixes: 71135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EACMV_fuzzer-6251879028293632
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 c3a1cbbf5d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:37 +02:00
Michael Niedermayer
252222c48f
avcodec/jfdctint_template: use unsigned z* in row_fdct()
...
Fixes: signed integer overflow: 856827136 + 2123580416 cannot be represented in type 'int'
Fixes: 70772/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-5180569961431040
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 f27c8b04d3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:37 +02:00
Michael Niedermayer
e0a47550e9
avformat/mxfdec: More offset_temp checks
...
Fixes: signed integer overflow: 9223372036854775807 - -1927491430256034080 cannot be represented in type 'long'
Fixes: 70607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5282235077951488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5a96aa435a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:36 +02:00
Michael Niedermayer
de74e8ee6f
swscale/output: Fix undefined integer overflow in yuv2rgba64_2_c_template()
...
Fixes: signed integer overflow: -1082982400 + -1083218484 cannot be represented in type 'int'
Fixes: 70657/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6707819712675840
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 bd80c97391 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:36 +02:00
Michael Niedermayer
b24fff0e60
swscale/swscale: Use unsigned operation to avoid undefined behavior
...
I have not checked that the constant is correct, this just fixes the undefined behavior
Fixes: signed integer overflow: -646656 * 3517 cannot be represented in type 'int
Fixes: 70559/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5209368631508992
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 44c5641ae8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:36 +02:00
Michael Niedermayer
0b22eccc7c
avcodec/vc2enc: basic sanity check on slice_max_bytes
...
Fixes: left shift of 896021632 by 3 places cannot be represented in type 'int'
Fixes: 70544/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC2_fuzzer-6685593652756480
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 6df9a0292c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:35 +02:00
Michael Niedermayer
e7a715ff2b
avformat/mvdec: Check if name was fully read
...
Fixes: use of uninitialized value
Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024
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 4e39795c75 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:35 +02:00
Michael Niedermayer
be4a8ea47d
avcodec/wmavoice: Do not use uninitialized pitch[0]
...
Fixes: use of uninitialized value
Fixes: 70850/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-4806127362048000
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 5338707930 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:35 +02:00
Michael Niedermayer
f6c823fab0
avformat/apetag: Check APETAGEX
...
Fixes: Use of uninitialized value
Fixes: 71074/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5697034877730816
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 796ff2d599 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:34 +02:00
Michael Niedermayer
c351f8d61e
avcodec/avcodec: Warn about data returned from get_buffer*()
...
Text based on suggestion by: epirat07@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 93444c46fce195e378c4ebb1a20ea662e7f0123b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:34 +02:00
Michael Niedermayer
e9e2c60742
avcodec/aic: Clear slice_data
...
Fixes: use-of-uninitialized-value
Fixes: 70865/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-4874102695854080
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 de3f6c8888 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:34 +02:00
Michael Niedermayer
56a46d084d
avcodec/vc1dec: Clear mb_type_base and ttblk_base
...
Fixes: two use-of-uninitialized-value
Fixes: 70856/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5539349918187520
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 50471f96c4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:33 +02:00
Michael Niedermayer
3c434e3137
avcodec/shorten: clear padding
...
Fixes: use-of-uninitialized-value
Fixes: 70854/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5533480570650624
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 e44349ee88 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:33 +02:00
Michael Niedermayer
fc9f06b284
avformat/mpeg: Check an avio_read() for failure
...
Fixes: use-of-uninitialized-value
Fixes: 70849/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGPS_fuzzer-4684401009557504
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 66ee75d76c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:33 +02:00
Michael Niedermayer
1594615ff7
avformat/segafilm: Set keyframe
...
Fixes: use of uninitialized value
Fixes: 70871/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-5883617752973312
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 4dc7dfe65a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:32 +02:00
Michael Niedermayer
b1d497354a
avcodec/dxva2: initialize hr in ff_dxva2_common_end_frame()
...
Related: CID1591924 Uninitialized scalar variable
Related: CID1591938 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1d6a2aebae )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:32 +02:00
Michael Niedermayer
c86e9cde18
avcodec/dxva2: initialize validate
...
Related: CID1591915 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2232c4cc8c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:31 +02:00
Michael Niedermayer
a3254fd687
avcodec/dxva2: Initialize ConfigBitstreamRaw
...
Related: CID1591894 Uninitialized scalar variable
Related: CID1591906 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 489c05b9c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:31 +02:00
Michael Niedermayer
ca55217925
avcodec/dxva2: Initialize dxva_size and check it
...
Related: CID1591878 Uninitialized scalar variable
Related: CID1591928 Uninitialized pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c8c59e9929 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:31 +02:00
Michael Niedermayer
92625e05fe
avfilter/vf_tonemap_opencl: Dereference after NULL check
...
Fixes: CID1437472 Dereference before null check
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e5c0f56ca0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:30 +02:00
Michael Niedermayer
f19fa10643
avformat/lmlm4: Eliminate some AVERROR(EIO)
...
Found by code review related to CID732224 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 191a685010 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:30 +02:00
Michael Niedermayer
f09b8df1d0
avformat/wtvdec: Check length of read mpeg2_descriptor
...
Fixes: Use of uninitialized value
Fixes: 70900/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6286909377150976
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 c390234da2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:30 +02:00
Michael Niedermayer
07b577e6ee
avformat/wtvdec: clear sectors
...
The code can leave uninitialized holes in the array.
Fixes: use of uninitialized values
Fixes: 70883/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6698694567591936
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 c95ea03104 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:29 +02:00
Kacper Michajłow
607d002a9d
avcodec/parser: ensure input padding is zeroed
...
Fixes use of uninitialized value, reported by MSAN.
Found by OSS-Fuzz.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com >
Fixes: 70852/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5179190066872320
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5dfc0cc841 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:29 +02:00
Michael Niedermayer
e9cf7a8c81
avformat/img2dec: Clear padding data after EOF
...
Fixes: use-of-uninitialized-value
Fixes: 70852/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5179190066872320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Kacper Michajlow <kasper93@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3978e81809 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:29 +02:00
Michael Niedermayer
4ac3fa04a5
avformat/wavdec: Check if there are 16 bytes before testing them
...
Fixes: use-of-uninitialized-value
Fixes: 70839/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5212907590189056
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 79a1cf30d1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2025-05-16 03:03:28 +02:00
Janne Grunau
655b6f8877
vp9: recon: Use emulated edge to prevent buffer overflows
...
The arm/aarch64 horizontal filter reads one additional pixel beyond what
the filter uses. This can become an issue if the application does not
allocate larger buffers than what's required for the pixel data. If the
motion vector points to the bottom right edge of the picture this
becomes a read buffer overflow. This triggers segfaults in Firefox for
video resolutions which result in a page aligned picture size like
1280x640.
Prevent this by using emulated edge in this case.
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1881185
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net >
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
(cherry picked from commit 060464105b )
2025-01-04 07:31:07 -05:00
Janne Grunau
a342536d6b
arm: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter
...
This reduces the amount the horizontal filters read beyond the filter
width to a consistent 1 pixel. The data is not used so this is usually
not noticeable. It becomes a problem when the application allocates
frame buffers only for the aligned picture size and the end of it is at
a page boundary. This happens for picture sizes which are a multiple of
the page size like 1280x640. The frame buffer allocation is based on
its most likely done via mmap + MAP_ANONYMOUS so start and end of the
buffer are page aligned and the previous and next page are not
necessarily mapped.
This mirrors the aarch64 change.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net >
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
(cherry picked from commit f366256215 )
2025-01-04 07:31:07 -05:00
Janne Grunau
bfed437be8
aarch64: vp9mc: Load only 12 pixels in the 4 pixel wide horizontal filter
...
This reduces the amount the horizontal filters read beyond the filter
width to a consistent 1 pixel. The data is not used so this is usually
not noticeable. It becomes a problem when the application allocates
frame buffers only for the aligned picture size and the end of it is at
a page boundary. This happens for picture sizes which are a multiple of
the page size like 1280x640. The frame buffer allocation is based on
its most likely done via mmap + MAP_ANONYMOUS so start and end of the
buffer are page aligned and the previous and next page are not
necessarily mapped.
Under these conditions like seen by Firefox a read beyond the end of the
buffer results in a segfault.
After the over-read is reduced to a single pixel it's reasonable to use
VP9's emulated edge motion compensation for this.
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1881185
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net >
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
(cherry picked from commit 430c38f698 )
2025-01-04 07:31:07 -05:00
Ramiro Polla
54034aa338
configure: improve check for POSIX ioctl
...
Instead of relying on system #ifdefs which may or may not be correct,
detect the POSIX ioctl signature at configure time.
(cherry picked from commit 00b64fca55 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 21:07:24 -04:00
Ramiro Polla
13f5d6eba5
configure: restore autodetection of v4l2 and fbdev
...
The detection logic for v4l2 and fbdev was accidentally modified to
depend on v4l2-m2m in 43b3412 .
(cherry picked from commit 7405f1ad53 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 21:06:40 -04:00
Jun Zhao
6247037d6c
configure: fix --disable-v4l2-m2m can't work
...
Use the command ./configure with/without --disable-v4l2-m2m test.
Reviewed-by: Aman Gupta <aman@tmm1.net >
Signed-off-by: Jun Zhao <barryjzhao@tencent.com >
(cherry picked from commit 43b3412631 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 21:05:24 -04:00
Brad Smith
98968e2a1b
configure: use just the pkg-config for sndio
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f6d8464590 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:33:33 -04:00
Brad Smith
25d75ff1f5
configure: enable ffnvcodec, nvenc, nvdec for FreeBSD
...
Signed-off-by: Brad Smith <brad@comstyle.com >
(cherry picked from commit 43b1a95678 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:32:22 -04:00
Brad Smith
6d9e2e94c3
avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
...
Use the machdep.altivec sysctl on NetBSD for AltiVec detection
as is done with OpenBSD.
(cherry picked from commit 115c96b9bd )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:31:51 -04:00
Brad Smith
3eb8705ab7
avutil/ppc/cpu: Use proper header for OpenBSD PPC CPU detection
...
Use the proper header for PPC CPU detection code. sys/param.h includes
sys/types, but sys/types.h is the more appropriate header to be used
here.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit beaf172d75 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:29:54 -04:00
Brad Smith
084c75f664
lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's
...
The proper type was used until 73251678c8 .
This covers all of the OS's that currently have V4L2 support, permutations
of Linux glibc/musl, Android bionic, FreeBSD, NetBSD, OpenBSD, Solaris.
Copied from FreeBSD ports patch.
Signed-off-by: Brad Smith <brad@comstyle.com >
Signed-off-by: Marton Balint <cus@passwd.hu >
(cherry picked from commit 9e674b3160 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:28:45 -04:00
Brad Smith
5fb8f0e850
configure: use pkg-config for sndio
...
(cherry picked from commit bb813ccb45 )
Signed-off-by: Brad Smith <brad@comstyle.com >
2024-09-01 20:27:57 -04:00
Ross Burton
05e413bfb2
libavcodec/arm/mlpdsp_armv5te: fix label format to work with binutils 2.43
...
binutils 2.43 has stricter validation for labels[1] and results in errors
when building ffmpeg for armv5:
src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
Remove the leading zero in the "01" label to resolve this error.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
Signed-off-by: Ross Burton <ross.burton@arm.com >
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit 654bd47716 )
2024-08-16 13:49:45 +03:00
Michael Niedermayer
64b96e2c91
update for 4.2.10
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-08-01 02:07:16 +02:00
Michael Niedermayer
0d1d6587d0
avcodec/snow: Fix off by 1 error in run_buffer
...
Fixes: out of array access
Fixes: 70741/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5703668010647552
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 06f5ed40f8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-08-01 00:30:47 +02:00
Michael Niedermayer
4876fbc181
avcodec/utils: apply the same alignment to YUV410 as we do to YUV420 for snow
...
The snow encoder uses block based motion estimation which can read out of array if
insufficient alignment is used
It may be better to only apply this for the encoder, as it would safe a few bytes of memory
for the decoder. Until then, this fixes the issue in a simple way.
Fixes: out of array access
Fixes: 68963/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-4979988435632128
Fixes: 68969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6239933667803136.fuzz
Fixed: 70497/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5751882631413760
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 58fbeb59e7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-08-01 00:27:25 +02:00
Michael Niedermayer
4e5b5a06d7
avcodec/vaapi_encode: Check hwctx
...
Fixes: null pointer dereference
Fixes: 70376/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_VAAPI_fuzzer-4733551250046976
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 3cd077e282 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-24 14:21:48 +02:00
Michael Niedermayer
11834dcd8b
avcodec/proresdec: Consider negative bits left
...
Fixes: 70036/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-6298797647396864
Fixes: shift exponent 40 is too large for 32-bit type 'uint32_t' (aka 'unsigned int')
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 419eee6356 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-24 14:19:37 +02:00
Michael Niedermayer
aa564c7cbd
avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices
...
An alternative would be to leave the context unchanged on failure of hls_slice_header()
Fixes: out of array access
Fixes: NULL pointer dereference
Fixes: 69584/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5931086299856896
Fixes: 69724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5104066422702080
Fixes: 70422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5908731129298944
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 5d9544cfb0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-24 01:03:13 +02:00
Andreas Rheinhardt
df61b59fe2
avcodec/diracdsp: Remove unused variable
...
Forgotten in ca3c6c981a .
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
(cherry picked from commit 310d4062e7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 22:23:37 +02:00
Michael Niedermayer
85993ceae3
avformat/hcom: Tell the compiler about set but not read variables
...
This avoids 3 warnings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 22:23:00 +02:00
Carl Eugen Hoyos
cf1bc6898c
lavf/chromaprint: Silence compilation warnings
...
Fixes the following warnings:
libavformat/chromaprint.c:117:42: warning: passing argument 2 of ‘chromaprint_feed’ from incompatible pointer type
libavformat/chromaprint.c:132:52: warning: passing argument 2 of ‘chromaprint_get_raw_fingerprint’ from incompatible pointer type
libavformat/chromaprint.c:143:71: warning: passing argument 4 of ‘chromaprint_encode_fingerprint’ from incompatible pointer type
2024-07-22 22:21:16 +02:00
Michael Niedermayer
9dab6f69a4
avutil/slicethread: Check pthread_*_init() for failure
...
Fixes: CID1604383 Unchecked return value
Fixes: CID1604439 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 23851c9ee0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:30:04 +02:00
Michael Niedermayer
787e8cfafe
avutil/frame: Check log2_crop_align
...
Fixes: CID1604586 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 15540b3d28 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:29:02 +02:00
Michael Niedermayer
15b5b0e455
avutil/buffer: Check ff_mutex_init() for failure
...
Fixes: CID1604487 Unchecked return value
Fixes: CID1604494 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 82f5b20ff5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:28:34 +02:00
Michael Niedermayer
7d53bbe195
avformat/xmv: Check this_packet_size
...
Fixes: CID1604489 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 696685df0c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:27:41 +02:00
Michael Niedermayer
b22859bd00
avformat/ty: rec_size seems to only need 32bit
...
May help CID1604560 Overflowed integer argument
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit be30913538 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:27:10 +02:00
Michael Niedermayer
ec4e963318
avformat/tty: Check avio_size()
...
Fixes: CID1220824 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 41745e550a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:26:52 +02:00
Michael Niedermayer
cedd68972d
avformat/siff: Basic pkt_size check
...
Fixes: half of CID1258461 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 124a97dd8b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:26:19 +02:00
Michael Niedermayer
fd8b766daf
avformat/sauce: Check avio_size() for failure
...
Fixes: CID1604592 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 759aae590c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:25:41 +02:00
Michael Niedermayer
cde55124df
avformat/sapdec: Check ffurl_get_file_handle() for error
...
Fixes: CID1604506 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3e305a0e70 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:24:51 +02:00
Michael Niedermayer
bc559f233c
avformat/nsvdec: Check asize for PCM
...
Fixes: CID1604527 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e83e246504 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:24:31 +02:00
Michael Niedermayer
16ab4d1280
avformat/mp3dec: Check header_filesize
...
Fixes: CID1608714 Division or modulo by float zero
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cea4dbc903 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:24:04 +02:00
Michael Niedermayer
0522da9af4
avformat/mp3dec; Check for avio_size() failure
...
Fixes: CID1608710 Improper use of negative value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bb936a1a72 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:23:27 +02:00
Michael Niedermayer
0562ec0f9a
avformat/mov: Use 64bit for str_size
...
We assign a 64bit variable to it before checking
Fixes: CID1604544 Overflowed integer argument
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 046d069552 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:23:02 +02:00
Michael Niedermayer
cda69b5438
avformat/mm: Check length
...
Fixes: CID1220824 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 139bf41246 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:22:19 +02:00
Michael Niedermayer
b7937a478e
avformat/hnm: Check *chunk_size
...
Fixes: CID1604419 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 291356f58b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 16:21:53 +02:00
Michael Niedermayer
17fdfb231e
avformat/asfdec_o: Check size of index object
...
We subtract 24 so it must be at least 24
Fixes: CID1604482 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 891bc070f0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 14:49:51 +02:00
Michael Niedermayer
94cc79e6f4
avfilter/vf_lut3d: Check av_scanf()
...
Fixes: CID1604398 Unchecked return value
Fixes: CID1604542 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ace2e25720 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 10:47:17 +02:00
Michael Niedermayer
82953b7570
swscale/output: Fix integer overflows in yuv2rgba64_X_c_template
...
Fixes: signed integer overflow: -1082982400 + -1068681048 cannot be represented in type 'int'
Fixes: 69995/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6285740271534080
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 bcab9789ef )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 10:42:24 +02:00
Michael Niedermayer
4e68dd522e
avformat/mxfdec: Reorder elements of expression in bisect loop
...
Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long'
Fixes: 68578/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6032171648221184
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 d8d288479d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 01:18:36 +02:00
Michael Niedermayer
b230ab8287
avcodec/utvideoenc: Use unsigned shift to build flags
...
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 69083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-5608202363273216
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 69e90491f1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 01:09:45 +02:00
Michael Niedermayer
b1e529b1ad
avcodec/vc2enc: Fix overflows with storing large values
...
Fixes: left shift of 1431634944 by 2 places cannot be represented in type 'int'
Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int'
Fixes: 69061/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC2_fuzzer-6325700826038272
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 af99358353 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 01:07:46 +02:00
Michael Niedermayer
8dfbe9602e
avcodec/mpegvideo_enc: Do not duplicate pictures on shifting
...
Fixes: out of array access
Fixes: 69098/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG2VIDEO_fuzzer-6107989688778752
Fixes: 69599/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4848626296225792.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 9c8881cb35 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-22 01:07:06 +02:00
Michael Niedermayer
f7223b68b9
avfilter/vf_bm3d: Dont round MSE2SSE to an integer
...
Fixes: CID1439581 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ec18ec9fc1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:24:15 +02:00
Michael Niedermayer
5d303460fd
avdevice/dshow: Check device_filter_unique_name before use
...
Fixes: CID1591931 Explicit null dereferenced
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 175c191668 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:22:37 +02:00
Michael Niedermayer
942581505e
avdevice/dshow_filter: Use wcscpy_s()
...
Fixes: CID1591929 Copy into fixed size buffer
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit daf61dddc8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:21:32 +02:00
Michael Niedermayer
a6f438d1ca
avcodec/flac_parser: Assert that we do not overrun the link_penalty array
...
Helps: CID1454676 Out-of-bounds read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9af348bd1a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:20:29 +02:00
Michael Niedermayer
96a7029503
avcodec/pixlet: Simplify pfx computation
...
Found by reviewing code related to CID1604365 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0474614e6c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:19:18 +02:00
Michael Niedermayer
027e1b567f
avcodec/motion_est: Fix score squaring overflow
...
Fixes: CID1604552 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f18b442370 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:18:33 +02:00
Michael Niedermayer
deb5899fd1
avcodec/loco: Check loco_get_rice() for failure
...
Fixes: CID1604495 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d553276843 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:16:38 +02:00
Michael Niedermayer
1a0f4df41b
avcodec/loco: check get_ur_golomb_jpegls() for failure
...
Fixes: CID1604400 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b989986641 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:16:10 +02:00
Michael Niedermayer
a08d5d9c20
avcodec/imm4: check cbphi for error
...
Fixes: CID1604356 Overflowed constant
Fixes: CID1604573 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6e4c037833 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:14:15 +02:00
Michael Niedermayer
f6d8f260da
avcodec/iff: Use signed count
...
This is more a style fix than a bugfix (CID1604392 Overflowed constant)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cfe66dfebb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:12:48 +02:00
Michael Niedermayer
67f5cefa71
avcodec/golomb: Assert that k is in the supported range for get_ur/sr_golomb()
...
Found by code review related to CID1604563 Overflowed return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b2aaeb81f6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 22:11:23 +02:00
Michael Niedermayer
b4980eb3a8
avcodec/golomb: Document return for get_ur_golomb_jpegls() and get_sr_golomb_flac()
...
Found while reviewing code related to CID1604409 Overflowed return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7cf5b83f6f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:45:58 +02:00
Michael Niedermayer
d7b0f161f8
avcodec/dxv: Fix type in get_opcodes()
...
Found by code review related to CID1604386 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e5af1c6e91 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:45:40 +02:00
Michael Niedermayer
970435d982
avcodec/xsubdec: Check parse_timecode()
...
Fixes: CID1604490 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 96fd9417e2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:44:56 +02:00
Michael Niedermayer
ff190b57fd
avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit
...
width and height > 32bit is not supported and its easier to check in a central place
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ba63e32957 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:44:10 +02:00
Michael Niedermayer
5a092a2c79
avcodec/proresenc_kostya: use unsigned alpha for rotation
...
Fixes: left shift of negative value -208
Fixes: 69073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-4745020002336768
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 93e0265e27 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:43:00 +02:00
Michael Niedermayer
a721273193
avformat/rtmppkt: Simplify and deobfuscate amf_tag_skip() slightly
...
Found while reviewing: CID1530313 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cedbef0394 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:41:44 +02:00
Michael Niedermayer
99d609a44e
avformat/rmdec: use 64bit for audio_framesize checks
...
It is not entirely clear what would prevent such overflow so even if it is
not possible, it is better to use 64bit
Fixes: CID1491898 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 665be4fa2f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:40:56 +02:00
Michael Niedermayer
9f223bdd89
avutil/hwcontext_d3d11va: correct sizeof IDirect3DSurface9
...
Fixes: CID1591944 Wrong sizeof argument
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 628ba061c8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:40:13 +02:00
Michael Niedermayer
15e9ddc7d5
avutil/hwcontext_d3d11va: correct sizeof AVD3D11FrameDescriptor
...
Fixes: CID1591909 Wrong sizeof argument
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 698ed0d5a5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:39:42 +02:00
Michael Niedermayer
443a1af5b7
avformat/tls_schannel: Initialize ret
...
Fixes: CID1591881 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f022afea77 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:36:45 +02:00
Michael Niedermayer
2da89fbfb3
avformat/subfile: Assert that whence is a known case
...
This may help CID1452449 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 426d8c84c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:35:16 +02:00
Michael Niedermayer
68973a0e6c
avformat/subfile: Merge if into switch()
...
Found while reviewing CID1452449 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2a0a7d964b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:34:45 +02:00
Michael Niedermayer
d2bc683a22
avformat/rtsp: Check that lower transport is handled in one of the if()
...
Fixes: CID1473554 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c8200d3825 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:12:34 +02:00
Michael Niedermayer
f9ee20fe60
avformat/rtsp: initialize reply1
...
It seems reply1 is initialized by ff_rtsp_send_cmd() in most cases but there
are code paths like "continue" which look like they could skip it but even if not
writing this so a complex loop after several layers of calls initialized a local
variable through a pointer is just bad design.
This patch simply initialized the variable.
Fixes: CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 498ce4e8b8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:11:48 +02:00
Michael Niedermayer
b410d30ee9
avformat/rtsp: use < 0 for error check
...
Found while reviewing CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9bb38ba2b7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:11:04 +02:00
Michael Niedermayer
f5b33e8f6d
avformat/rtpenc_vc2hq: Check sizes
...
Fixes: CID1452585 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7a9ddb7051 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:10:37 +02:00
Michael Niedermayer
3ce3d74450
avfilter/af_aderivative: Free out on error
...
Fixes: CID1197065 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 382e9e79f3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 21:09:27 +02:00
Michael Niedermayer
0458066f8f
avfilter/af_pan: check nb_output_channels before use
...
Fixes: CID1500281 Out-of-bounds write
Fixes: CID1500331 Out-of-bounds write
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5fe8bf4aa5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 20:06:34 +02:00
Mark Thompson
80dc3dd0e4
cbs_av1: Reject thirty-two zero bits in uvlc code
...
The spec allows at least thirty-two zero bits followed by a one to mean
2^32-1, with no constraint on the number of zeroes. The libaom
reference decoder does not match this, instead reading thirty-two zeroes
but not the following one to mean 2^32-1. These two interpretations are
incompatible and other implementations may follow one or the other.
Therefore reject thirty-two zeroes because the intended behaviour is not
clear.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7110a36ba0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 20:05:33 +02:00
Michael Niedermayer
6a9d1c7673
tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 380a8213b1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 20:02:29 +02:00
Michael Niedermayer
add09d1fb6
avfilter/vf_avgblur: Check plane instead of AVFrame
...
Fixes: CID1551694 Use after free (false positive based on assuming that out == in and one is freed and one used)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c296d4fdec )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 20:02:03 +02:00
Michael Niedermayer
791704d8ec
avformat/rdt: Check pkt_len
...
Fixes: CID1473553 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0d0373de3b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:59:21 +02:00
Michael Niedermayer
07cbcedc46
avformat/mpeg: Check len in mpegps_probe()
...
Fixes: CID1473590 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ca237a841e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:58:38 +02:00
Michael Niedermayer
68089f6940
avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure
...
Fixes: CID1591939 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4c285bb278 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:57:22 +02:00
Michael Niedermayer
9e38ce882e
avcodec/vc1_loopfilter: Factor duplicate code in vc1_b_h_intfi_loop_filter()
...
Fixes: CID1435168
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 63ecce9ba8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:56:45 +02:00
Michael Niedermayer
f2513d3013
avformat/img2dec: assert no pipe on ts_from_file
...
Help coverity with CID1500302 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4824156fa0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:55:43 +02:00
Michael Niedermayer
4ac8994d9d
avcodec/cbs_jpeg: Try to move the read entity to one side in a test
...
The checked entity should be alone on one side of the check, this avoids
complex considerations of overflows.
This fixes a issue of bad style in our code and a coverity issue.
Fixes: CID1439654 Untrusted pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 385784a148 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 19:55:14 +02:00
Michael Niedermayer
5d7f80e696
avformat/mov: Check edit list for overflow
...
Fixes: 67492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5778297231310848
Fixes: signed integer overflow: 2314885530818453536 + 7782220156096217088 cannot be represented in type 'long'
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 2882d30e3a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 18:56:12 +02:00
Michael Niedermayer
3b471ef25e
fftools/ffmpeg: Check read() for failure
...
Fixes: CID1591932 Ignoring number of bytes read
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 34fd247c3b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 18:55:37 +02:00
Michael Niedermayer
77c7c10755
swscale/output: Avoid undefined overflow in yuv2rgb_write_full()
...
Fixes: signed integer overflow: -140140 * 16525 cannot be represented in type 'int'
Fixes: 68859/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4516387130245120
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 c221c7422f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:36:40 +02:00
Michael Niedermayer
709fae3a49
swscale/output: alpha can become negative after scaling, use multiply
...
Fixes: left shift of negative value -3245
Fixes: 69047/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6571511551950848
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 9e6c5b6e86 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:36:07 +02:00
Michael Niedermayer
a97cd26f1c
avcodec/targaenc: Allocate space for the palette
...
Fixes: out of array access
Fixes: 68927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5105665067515904
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 4a7220bd5c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:27:47 +02:00
Michael Niedermayer
7b45312ef3
avcodec/r210enc: Use av_rescale for bitrate
...
Fixes: signed integer overflow: 281612954574848 * 65344 cannot be represented in type 'long'
Fixes: 68956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_R210_fuzzer-6459074458746880
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 d34d4b6a7c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:25:35 +02:00
Michael Niedermayer
b5aa25d9d4
avcodec/jfdctint_template: Fewer integer anomalies
...
Fixes: signed integer overflow: 105788 * -20995 cannot be represented in type 'int'
Fixes: signed integer overflow: 923211729 + 2073948236 cannot be represented in type 'int'
Fixes: signed integer overflow: 1281179284 + 2073948236 cannot be represented in type 'int'
Fixes: 68975/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-6266769177116672
Fixes: 68997/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-6284237161431040
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 228f255b5d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:25:15 +02:00
Michael Niedermayer
b3e4512055
avcodec/snowenc: MV limits due to mv_penalty table size
...
Fixes: out of array read
Fixes: 69673/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5476592894148608
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 3a9292aff3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:24:42 +02:00
Michael Niedermayer
1804f1a533
avformat/mxfdec: Check container_ul->desc before use
...
Fixes: CID1592939 Dereference after null check
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4cab028bd0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:22:27 +02:00
Michael Niedermayer
d62cc430e2
MAINTAINERS: Update the entries for the release maintainer for FFmpeg
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 97ecfb5a19 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-21 17:20:29 +02:00
Lynne
6553f7e641
configure: update copyright year
...
(cherry picked from commit b95ee2ec5f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-15 00:38:21 +02:00
Michael Niedermayer
139a843a47
avfilter/vf_rotate: Check ff_draw_init2() return value
...
Fixes: NULL pointer dereference
Fixes: 3_343
Found-by: De3mond
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9c9f095e30 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 22:17:40 +02:00
Michael Niedermayer
9110293732
avformat/matroskadec: Assert that num_levels is non negative
...
Maybe Closes: CID1452496 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 019fce18bb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 21:33:37 +02:00
Michael Niedermayer
31cf3e5eb3
avformat/img2dec: Move DQT after unrelated if()
...
Fixes: CID1494636 Missing break in switch
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7d04c6016b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 21:32:14 +02:00
Michael Niedermayer
2d829ce1e3
avdevice/xcbgrab: Check sscanf() return
...
Alot more input checking can be performed, this is only checking the obvious missing case
Fixes: CID1598562 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 78d6d13bab )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 20:21:42 +02:00
Michael Niedermayer
2bf3c458ad
fftools/cmdutils: Add protective () to FLAGS
...
issue found while reviewing CID1452612 Free of array-typed value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d9b9fc4be2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:58:05 +02:00
Michael Niedermayer
ef800a7072
avformat/sdp: Check before appending ","
...
Found by reviewing code related to CID1500301 String not null terminated
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5b82852519 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:47:24 +02:00
Michael Niedermayer
7d21ba839b
avcodec/ilbcdec: Remove dead code
...
Yes the same dead code is in "iLBC Speech Coder ANSI-C Source Code"
Fixes: CID1509370 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8a64a003b5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:45:30 +02:00
Michael Niedermayer
dec23acac5
avcodec/vp8: Check cond init
...
Fixes: CID1598563 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9b76e49061 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:44:54 +02:00
Michael Niedermayer
f34e52ed28
avcodec/vp8: Check mutex init
...
Fixes: CID1598556 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4ac7405aaf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:43:59 +02:00
Michael Niedermayer
6cc4e8e759
avcodec/tests/dct: Use 64bit in intermediate for error computation
...
Fixes: CID1500284 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 161d0aa2a8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:40:54 +02:00
Michael Niedermayer
9803a178bd
avcodec/scpr3: Check add_dec() for failure
...
Fixes: CID1441459 Improper use of negative value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d741638042 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:40:39 +02:00
Michael Niedermayer
b48f33a17c
avcodec/wavpackenc: Use unsigned for potential 31bit shift
...
Fixes: CID1465481 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6f976db251 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:39:36 +02:00
Michael Niedermayer
a7ac6a5cfc
avcodec/tests/jpeg2000dwt: Use 64bit in comparission
...
Found while reviewing: CID1500309 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 12391b732f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:38:43 +02:00
Michael Niedermayer
26497c6867
avcodec/tests/jpeg2000dwt: Use 64bit in err2 computation
...
This issue cannot happen with the current function parameters
Fixes: CID1500309 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 847a53f264 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 19:38:23 +02:00
Michael Niedermayer
86ec84e4d0
avformat/ape: Use 64bit for final frame size
...
Fixes: CID1505963 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a2b8d03347 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:51:26 +02:00
Michael Niedermayer
8cb6ff56c2
avcodec/tiff: Assert init_get_bits8() success in unpack_gray()
...
Helps: CID1441939 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a287f17db2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:33:04 +02:00
Michael Niedermayer
97411b1790
swscale/yuv2rgb: Use 64bit for brightness computation
...
This will not overflow for normal values
Fixes: CID1500280 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bfc22f364d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:30:08 +02:00
Michael Niedermayer
9c5d490f3b
avutil/tests/opt: Check av_set_options_string() for failure
...
This is test code after all so it should test things
Fixes: CID1518990 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e3481730ed )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:29:26 +02:00
Michael Niedermayer
da238fcbeb
avutil/tests/dict: Check av_dict_set() before get for failure
...
Failure is possible due to strdup()
Fixes: CID1516764 Dereference null return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e8a1e1899d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:28:59 +02:00
Michael Niedermayer
f7758af2eb
avdevice/dshow: fix badly indented line
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c4004605b2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 18:26:44 +02:00
Michael Niedermayer
3d5dec9fa4
avcodec/mscc & mwsc: Check loop counts before use
...
This could cause timeouts
Fixes: CID1439568 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e35fe3d8b9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:15 +02:00
Michael Niedermayer
a751406b91
avcodec/mpegvideo_enc: Fix potential overflow in RD
...
Fixes: CID1500285 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b6b2b01025 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:15 +02:00
Michael Niedermayer
96fcd5b12b
avcodec/mpeg4videodec: assert impossible wrap points
...
Helps: CID1473517 Uninitialized scalar variable
Helps: CID1473497 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8fc649b931 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:14 +02:00
Michael Niedermayer
bf085d1625
avcodec/vble: Check av_image_get_buffer_size() for failure
...
Fixes: CID1461482 Improper use of negative value
Sponsored-by: Sovereign Tech Fund
Reviewed-.by: "Xiang, Haihao" <haihao.xiang@intel.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit dd5379db5d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:14 +02:00
Michael Niedermayer
9733f4e4a2
avcodec/vp3: Replace check by assert
...
Fixes: CID1452425 Logically dead code
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1b991e77b9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:14 +02:00
Michael Niedermayer
b404e4687a
avcodec/jpeg2000dec: remove ST=3 case
...
Fixes: CID1460979 Logically dead code
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4ed4f9a6c0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:13 +02:00
Michael Niedermayer
b7ec078810
avcodec/fmvc: remove dead assignment
...
Fixes: CID1529220 Unused value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 96c1162545 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:13 +02:00
Michael Niedermayer
9f8e7f8596
avcodec/h264_slice: Remove dead sps check
...
Fixes: CID1439574 Dereference after null check
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a68aa951b2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:13 +02:00
Michael Niedermayer
5c7f74004b
avcodec/lpc: copy levenson coeffs only when they have been computed
...
Fixes: CID1473514 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c2d897f356 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:12 +02:00
Michael Niedermayer
81333bd9fd
avutil/tests/base64: Check with too short output array
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c304784a86 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:12 +02:00
Michael Niedermayer
7ed79fe736
libavutil/base64: Try not to write over the array end
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2d216566f2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:12 +02:00
Michael Niedermayer
98c7f5a2fc
avcodec/cbs_av1: Avoid shift overflow
...
Fixes: CID1465488 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d7924a4f60 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:11 +02:00
Michael Niedermayer
c241b2c23a
avcodec/mpegvideo_enc: Fix 1 line and one column images
...
Fixes: Ticket10952
Fixes: poc21ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 96449cfeae )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:11 +02:00
Michael Niedermayer
c3078364af
swscale/output: Fix integer overflow in yuv2rgba64_full_1_c_template()
...
Fixes: signed integer overflow: -1082982400 + -1079364728 cannot be represented in type 'int'
Fixes: 67910/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5329011971522560
The input is 9bit in 16bit, the fuzzer fills all 16bit thus generating "invalid" input
No overflow should happen with valid input.
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 1330a73cca )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:11 +02:00
Michael Niedermayer
658d282659
swscale/output: Fix integer overflow in yuv2rgba64_1_c_template
...
Fixes: signed integer overflow: -831176 * 9539 cannot be represented in type 'int'
Fixes: 67869/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5117342091640832
The input is 9bit in 16bit, the fuzzer fills all 16bit thus generating "invalid" input
No overflow should happen with valid input.
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 a56559e688 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:10 +02:00
Michael Niedermayer
f92cfcec5f
avformat/mxfdec: Check body_offset
...
Fixes: signed integer overflow: 538976288 - -9223372036315799520 cannot be represented in type 'long'
Fixes: 68060/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5523457266745344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 20a6bfda0f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-13 11:23:10 +02:00
Michael Niedermayer
f18ee4d5a2
avcodec/ac3_parser: Check init_get_bits8() for failure
...
Fixes: CID1420393 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Lynne <dev@lynne.ee >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 63415168db )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:50:02 +02:00
Michael Niedermayer
ed652b3070
avcodec/hevcdec: Check ref frame
...
Fixes: NULL pointer dereferences
Fixes: 68197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6382538823106560
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5eb05f4450 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:48:15 +02:00
Michael Niedermayer
4aaea247e8
doc/examples/vaapi_transcode: Simplify loop
...
Fixes: CID1428858(1/2) Logically dead code
Sponsored-by: Sovereign Tech Fund
Reviewed-by: "mypopy@gmail.com " <mypopy@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c9c11a0866 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:21:20 +02:00
Michael Niedermayer
f7fb70292b
avfilter/vf_thumbnail_cuda: Set ret before checking it
...
Fixes: CID1418336 Logically dead code
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 02301017d2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:18:57 +02:00
Michael Niedermayer
84e5322442
avfilter/signature_lookup: Dont copy uninitialized stuff around
...
Fixes: CID1403238 Uninitialized pointer read
Fixes: CID1403239 Uninitialized pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e7174e66ac )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:18:19 +02:00
Michael Niedermayer
339f9e76f3
avfilter/signature_lookup: Fix 2 differences to the refernce SW
...
Fixes: CID1403227 Division or modulo by float zero
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 25cb66369e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-05-22 02:17:56 +02:00
Andreas Rheinhardt
1076d31485
fate/subtitles: Ignore line endings for sub-scc test
...
Since 7bf1b9b357 ,
the test produces ordinary \n, yet this is not what the reference
file used for the most time, leading to test failures.
Reviewed-by: Martin Storsjö <martin@martin.st >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
(cherry picked from commit 99d33cc661 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:50 +02:00
Michael Niedermayer
e31a6f88c4
avformat/mxfdec: Check index_edit_rate
...
Fixes: Assertion b >=0 failed at libavutil/mathematics.c:62
Fixes: 67811/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5108429687422976
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 ed49391961 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:50 +02:00
Michael Niedermayer
c0bb8e0e62
swscale/utils: Fix xInc overflow
...
Fixes: signed integer overflow: 2 * 1073741824 cannot be represented in type 'int'
Fixes: 67802/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6249515855183872
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 1a9eda65d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:50 +02:00
Michael Niedermayer
1f2c98d1c2
avformat/mxfdec: Make edit_unit_byte_count unsigned
...
Suggested-by: Marton Balint <cus@passwd.hu >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f30fe5e8d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:49 +02:00
Michael Niedermayer
642e31ad89
avformat/movenc: Check that cts fits in 32bit
...
Fixes: Assertion av_rescale_rnd(start_dts, mov->movie_timescale, track->timescale, AV_ROUND_DOWN) <= 0 failed at libavformat/movenc.c:3694
Fixes: poc2
Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d88c284c18 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:49 +02:00
Michael Niedermayer
9f31c87487
avformat/mxfdec: Check first case of offset_temp computation for overflow
...
This is kind of ugly
Fixes: signed integer overflow: 255 * 1157565362826411919 cannot be represented in type 'long'
Fixes: 67313/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6250434245230592
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 d6ed6f6e8d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:49 +02:00
Michael Niedermayer
010ebbf11d
avfilter/vf_signature: Dont crash on no frames
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3d5f03bbc8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:48 +02:00
Michael Niedermayer
0af7379725
avformat/westwood_vqa: Fix 2g packets
...
Fixes: signed integer overflow: 2147483424 * 2 cannot be represented in type 'int'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-4576211411795968
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 86f73277bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:48 +02:00
Michael Niedermayer
f1e7da6d85
avformat/matroskadec: Check timescale
...
Fixes: 3.82046e+18 is outside the range of representable values of type 'unsigned int'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6381436594421760
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 e849eb2343 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:48 +02:00
Michael Niedermayer
7800e609d0
avformat/sbgdec: Check for negative duration
...
Fixes: signed integer overflow: 9223372036854775807 - -8000000 cannot be represented in type 'long'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-5133181743136768
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 0bed22d597 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:47 +02:00
Michael Niedermayer
5aa5518ac7
avformat/rpl: Use 64bit for total_audio_size and check it
...
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-4677434693517312
Fixes: signed integer overflow: 5555555555555555556 * 8 cannot be represented in type 'long long'
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 878625812f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:47 +02:00
Michael Niedermayer
cbc9e5e655
avformat/timecode: use 64bit for intermediate for rounding in fps_from_frame_rate()
...
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4802790784303104
Fixes: signed integer overflow: 1768972133 + 968491058 cannot be represented in type 'int'
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 3d8d778a68 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:47 +02:00
Michael Niedermayer
dcfc13c199
avformat/concatdec: Check user_duration sum
...
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6434245599690752
Fixes: signed integer overflow: 9223372026773000000 + 22337000000 cannot be represented in type 'long'
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 007486058c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:46 +02:00
Michael Niedermayer
45011af5b4
avcodec/truemotion1: Height not being a multiple of 4 is unsupported
...
mb_change_bits is given space based on height >> 2, while more data is read
Fixes: out of array access
Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION1_fuzzer-5201925062590464.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 ebdcf98499 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:46 +02:00
Michael Niedermayer
f2b70a4e6b
avformat/cafdec: Check that data chunk end fits within 64bit
...
Fixes: signed integer overflow: 64 + 9223372036854775803 cannot be represented in type 'long long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6536881135550464
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6536881135550464
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 b792e4d4c7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:46 +02:00
Michael Niedermayer
6a9879944f
avformat/dxa: Adjust order of operations around block align
...
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_DXA_fuzzer-5730576523198464
Fixes: signed integer overflow: 2147483566 + 82 cannot be represented in type 'int'
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 50d8e4f273 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:45 +02:00
Michael Niedermayer
119eb87952
avformat/cafdec: dont seek beyond 64bit
...
Fixes: signed integer overflow: 64 + 9223372036854775807 cannot be represented in type 'long long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6418242730328064
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 d973fcbcc2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:45 +02:00
Michael Niedermayer
5b46b00ece
avformat/id3v2: read_uslt() check for the amount read
...
Fixes: timeout
Fixes: 66783/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5356884892647424
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 c0f4abe2aa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:45 +02:00
Michael Niedermayer
a63bece8ae
avcodec/proresenc_kostya: Remove bug similarity text
...
According to kostya, it is not based on Wassermans encoder
CC: Kostya Shishkov <kostya.shishkov@gmail.com >
CC: Anatoliy Wasserman <anatoliy.wasserman@yandex.ru >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e0e30e07a1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:44 +02:00
Michael Niedermayer
c7122a760e
avcodec/vorbisdec: Check remaining data in vorbis_residue_decode_internal()
...
Fixes: timeout
Fixes: 66326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-6295291863040000
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 dc89cf804a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:44 +02:00
Michael Niedermayer
edad5b7064
avcodec/pngdec: Do not pass AVFrame into global header decode
...
The global header should not contain a frame, and decoding it
would result in leaks
Fixes: memleak
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-6603443149340672
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 d31d4f3228 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:44 +02:00
Michael Niedermayer
2c2dbde45e
libswscale/utils: Fix bayer to yuvj
...
Fixes: out of array access.
Earlier code assumes that a unscaled bayer to yuvj420 converter exists
but the later code then skips yuvj420
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e9cc9e492f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:43 +02:00
Michael Niedermayer
22eee37d23
swscale/swscale: Check srcSliceH for bayer
...
Fixes: Assertion srcSliceH > 1 failed at libswscale/swscale_unscaled.c:1359
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 64098d0cd8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:43 +02:00
Michael Niedermayer
84ed2a2b5a
swscale/utils: Allocate more dithererror
...
Fixes: out of array read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 18f26f8a2f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:43 +02:00
Michael Niedermayer
1c71021dda
avcodec/indeo3: Round dimensions up in allocate_frame_buffers()
...
Fixes: Ticket6581
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3be80ce299 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:42 +02:00
Michael Niedermayer
4cbd6195cd
avutil/rational: Document what is to be expected from av_d2q() of doubles representing rational numbers
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f465badb06 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:42 +02:00
Michael Niedermayer
f7e2d40540
avfilter/signature_lookup: Do not dereference NULL pointers after malloc failure
...
Fixes: CID 1403229 Dereference after null check
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 98ae1ad7cf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:42 +02:00
Michael Niedermayer
87dfd6ee88
avfilter/signature_lookup: dont leave uncleared pointers in sll_free()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6c50482951 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:41 +02:00
Michael Niedermayer
00a5834598
avcodec/mpegvideo_enc: Use ptrdiff_t for stride
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e063c1d079 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:41 +02:00
Romain Beauxis
fc7d0393bb
libavformat/hlsenc.c: Populate OTI using AAC profile in write_codec_attr.
...
This patch populates the third entry for HLS codec attribute using the
AAC profile.
The HLS specifications[1] require this value to be the Object Type ID as
referred to in table 1.3 of ISO/IEC 14496-3:2009[2].
The numerical constants in the code refer to these OTIs minus one, as
documented in commit 372597e[3], confirmed by comparing the values in the
code with the values in the table mentioned above.
Links:
1: https://datatracker.ietf.org/doc/html/rfc6381#section-3.3
2: https://csclub.uwaterloo.ca/~ehashman/ISO14496-3-2009.pdf
3: https://github.com/FFmpeg/FFmpeg/commit/372597e5381c097455a7b73849254d56083eb056
Changes in this version:
- Default value set to "mp4a.40.2" when profile is unknown for backward
compatibility.
Signed-off-by: Steven Liu <liuqi05@kuaishou.com >
(cherry picked from commit 797f0b27c1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:41 +02:00
Michael Niedermayer
961dcd9ab5
avcodec/mpegvideo_enc: Dont copy beyond the image
...
Fixes: out of array access
Fixes: tickets/10754/poc17ffmpeg
Discovered by Zeng Yunxiang.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a066b8a809 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:40 +02:00
Michael Niedermayer
4ce4f014b6
avfilter/vf_minterpolate: Check pts before division
...
Fixes: FPE
Fixes: tickets/10758/poc20ffmpeg
Discovered by Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 68146f06f8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:40 +02:00
Michael Niedermayer
545227475a
avformat/flacdec: Avoid double AVERRORS
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 029294ff54 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:40 +02:00
Michael Niedermayer
6dc59795a9
avfilter/vf_vidstabdetect: Avoid double AVERRORS
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bb04235d72 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:39 +02:00
Michael Niedermayer
ec9821247c
avfilter/vf_swaprect: round coordinates down
...
Fixes: out of array access:
Fixes: tickets/10745/poc12ffmpeg
Found-by: Li Zeyuan and Zeng Yunxiang.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7deaca71b3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:39 +02:00
Michael Niedermayer
698d4bc1be
avfilter/vf_swaprect: Use height for vertical variables
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9f4c5bd7d2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:39 +02:00
Michael Niedermayer
19b9bad4f7
avfilter/vf_swaprect: assert that rectangles are within memory
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9d1ba698d2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:38 +02:00
Michael Niedermayer
059dfb1a80
avfilter/af_alimiter: Check nextpos before use
...
Fixes: out of array read
Fixes: tickets/10744/poc11ffmpeg
Found-by: Li Zeyuan and Zeng Yunxiang.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a88b06f9ee )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:38 +02:00
Michael Niedermayer
cfcc45920e
avfilter/af_stereowiden: Check length
...
Fixes: out of array access
Fixes: tickets/10746/poc13ffmpeg
Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 50f0f8c53c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:38 +02:00
Michael Niedermayer
e65bae8a19
avfilter/vf_weave: Fix odd height handling
...
Fixes: out of array access
Fixes: tickets/10743/poc10ffmpeg
Found-by: Zeng Yunxiang and Li Zeyuan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0ecc1f0e48 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:37 +02:00
Michael Niedermayer
643e5f1dcb
avfilter/vf_gradfun: Do not overread last line
...
The code works in steps of 2 lines and lacks support for odd height
Implementing odd height support is better but for now this fixes the
out of array access
Fixes: out of array access
Fixes: tickets/10702/poc6ffmpe
Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e4d2666bdc )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:37 +02:00
Michael Niedermayer
4ace000985
avformat/mov: do not set sign bit for chunk_offsets
...
Fixes: signed integer overflow: 2314885530818453536 - -7412889664301817824 cannot be represented in type 'long'
Fixes: 64296/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6304027146846208
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 cfc0a68d4d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:37 +02:00
Michael Niedermayer
de65d41b70
avcodec/jpeglsdec: Check Jpeg-LS LSE
...
Fixes: signed integer overflow: 2147478526 + 33924 cannot be represented in type 'int'
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 64243/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5195717848989696
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 c72a20f01a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:36 +02:00
Brad Smith
c292c15e4a
configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm
...
Fixes the build. It's a requirement when utilizing PIE.
Signed-off-by: Brad Smith <brad@comstyle.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6066c430e3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:36 +02:00
Michael Niedermayer
7adacfd3e4
avformat/mov: Ignore duplicate ftyp
...
Fixes: switch_1080p_720p.mp4
Found-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4cdf2c7f76 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:36 +02:00
Martin Storsjö
63b1813119
seek: Fix crashes in ff_seek_frame_binary if built with latest Clang 14
...
Passing an uninitialized variable as argument to a function is
undefined behaviour (UB). The compiler can assume that UB does not
happen.
Hence, the compiler can assume that the variables are never
uninitialized when passed as argument, which means that the codepaths
that initializes them must be taken.
In ff_seek_frame_binary, this means that the compiler can assume
that the codepaths that initialize pos_min and pos_max are taken,
which means that the conditions "if (sti->index_entries)" and
"if (index >= 0)" can be optimized out.
Current Clang git versions (upcoming Clang 14) enabled an optimization
that does this, which broke the current version of this function
(which intentionally left the variables uninitialized, but silencing
warnings about being uninitialized). See [1] for discussion on
the matter.
[1] https://reviews.llvm.org/D105169#3069555
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit ab79263419 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:35 +02:00
Michael Niedermayer
373eec5e50
avcodec/4xm: Check for cfrm exhaustion
...
Fixes: index -1 out of bounds for type 'CFrameBuffer [100]'
Fixes: 63877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5854263397711872
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 bb0a684d93 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:35 +02:00
Michael Niedermayer
559b09ec89
avformat/mov: Disallow FTYP after streams
...
Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799
Fixes: 63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232
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 19fcf43131 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:35 +02:00
Frank Plowman
279ca7ced3
doc/html: fix styling issue with Texinfo 7.0
...
Texinfo 7.0 produces quite different HTML to Texinfo 6.8. Without
this change, enumerated option flags (i.e. Possible values of x
are...) render as white text on a white background with Texinfo 7.0
and are unreadable. This change removes a style for the selector
`.table .table` which causes the background to turn white for these
elements. As far as I can tell, it is not actually used anywhere in
files generated by Texinfo 6.8.
Signed-off-by: Frank Plowman <post@frankplowman.com >
(cherry picked from commit f16900bda2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:34 +02:00
Frank Plowman
93d0dbea3c
doc/html: support texinfo 7.0
...
Resolves trac ticket #10636 (http://trac.ffmpeg.org/ticket/10636 ).
Texinfo 7.0, released in November 2022, changed the names of various
functions. Compiling docs with Texinfo 7.0 resulted in warnings and
improperly formatted documentation. More old names appear to have
been removed in Texinfo 7.1, released October 2023, which causes docs
compilation to fail.
This commit addresses the issue by adding logic to switch between the old
and new function names depending on the Texinfo version. Texinfo 6.8
produces identical documentation before and after the patch.
CC
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1938238.html
https://bugs.gentoo.org/916104
Signed-off-by: Frank Plowman <post@frankplowman.com >
(cherry picked from commit f01fdedb69 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:34 +02:00
Matthew White
75d89d4cb6
doc/t2h.pm: fix missing TOC with texinfo 6.8 and above
...
Since texinfo 6.8, there's no longer an INLINE_CONTENTS variable.
makeinfo: warning: set_from_init_file: unknown variable INLINE_CONTENTS
texinfo commit 62a6adfb33b006e187483779974bbd45f0f782b1 replaced
INLINE_CONTENTS with OUTPUT_CONTENTS_LOCATION.
texinfo commit 41f8ed4eb42bf6daa7df7007afd946875597452d replaced
OUTPUT_CONTENTS_LOCATION with CONTENTS_OUTPUT_LOCATION.
With texinfo 6.8 and above, the same as INLINE_CONTENTS=1 could be
achieved by CONTENTS_OUTPUT_LOCATION=inline.
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Customization-Variables.html
(cherry picked from commit bfbd5954e5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:34 +02:00
Matthew White
01b17ca8aa
doc/t2h.pm: fix missing CSS with texinfo 6.8 and above
...
Since texinfo commit 6a5ceab6a48a4f052baad9f3474d741428409fd7, the
formatting functions, in particular begin_file, program_string and
end_file, are prefixed with format_, i.e. format_begin_file, etc.
This patch fixes building the documentation when texinfo 6.8, or
above, is used:
Unknown formatting type begin_file
at /usr/bin/makeinfo line 415.
Unknown formatting type program_string
at /usr/bin/makeinfo line 415.
Unknown formatting type end_file
at /usr/bin/makeinfo line 415.
(cherry picked from commit c980dd7a97 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:33 +02:00
Andreas Rheinhardt
d9d05e1213
avformat/matroskadec: Fix declaration-after-statement warnings
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
(cherry picked from commit 37b5f4a1f6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:33 +02:00
Michael Niedermayer
d254fe2d1d
avformat/rtsp: Use rtsp_st->stream_index
...
Fixes: out of array access
Fixes: rtpdec_h264.c149/poc
Found-by: Hardik Shah of Vehere
Reviewed-by: Martin Storsjö <martin@martin.st >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e4d5ac8d7d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:33 +02:00
Michael Niedermayer
6cec2a4a99
avcodec/jpeg2000dec: Check image offset
...
Fixes: left shift of negative value -538967841
Fixes: 62447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6427134337613824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 88453250db )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:32 +02:00
Sean McGovern
806acf0320
libavutil/ppc/cpu.c: check that AT_HWCAP2 is defined
...
It was not introduced until glibc 2.18.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d799ad2404 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:32 +02:00
Michael Niedermayer
9ddb556afb
avcodec/h2645_parse: Avoid EAGAIN
...
EAGAIN causes an assertion failure when it is returned from the decoder
Fixes: Assertion consumed != (-(11)) failed at libavcodec/decode.c:462
Fixes: assertion_IOT_instruction_decode_c_462/poc
Found-by: Hardik Shah of Vehere (Dawn Treaders team)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5ddab49d48 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:32 +02:00
Michael Niedermayer
97bd02c0f1
avcodec/xvididct: Make c* unsigned to avoid undefined overflows
...
Fixes: signed integer overflow: 1496950099 + 728014168 cannot be represented in type 'int'
Fixes: 62667/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-6511785170305024
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 f7e5537dc1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:31 +02:00
Michael Niedermayer
dca3db3ec9
avformat/tmv: Check video chunk size
...
This check matches the audio chunk check
Fixes: Timeout
Fixes: 62681/clusterfuzz-testcase-minimized-ffmpeg_dem_TMV_fuzzer-5299107876700160
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 b79fc70596 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:31 +02:00
Michael Niedermayer
676f7ceef6
avformat/xwma: sanity check bits_per_coded_sample
...
Fixes: signed integer overflow: 65312 * 524296 cannot be represented in type 'int'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-6595971445555200
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 fe6ce28d11 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:31 +02:00
Michael Niedermayer
104e51f17a
avformat/matroskadec: Check prebuffered_ns for overflow
...
Fixes: signed integer overflow: 9223372036630775808 + 1000000000 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-5406131992526848
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 2d6df3719d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:31 +02:00
Michael Niedermayer
792bf15685
avformat/wavdec: Check left avio_tell for overflow
...
Fixes: signed integer overflow: 155 + 9223372036854775655 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5364032278495232
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 929ddef3f4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:30 +02:00
Michael Niedermayer
3eb4388b40
avformat/tta: Better totalframes check
...
Fixes: signed integer overflow: 4 * 740491135 cannot be represented in type 'int'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6298893367508992
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 5f0d00464a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:30 +02:00
Michael Niedermayer
9def52386d
avformat/rpl: Check for number_of_chunks overflow
...
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int32_t' (aka 'int')
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-6086131095830528
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 b3c973acbe )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:30 +02:00
Michael Niedermayer
c53f2eaa2a
avformat/mov: compute absolute dts difference without overflow in mov_find_next_sample()
...
Fixes: signed integer overflow: -9223372036854775808 - 9222726413022000000 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5959420033761280
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 3508b496e1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:29 +02:00
Michael Niedermayer
61af3a5f2a
avformat/jacosubdec: Check timeres
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 51f0ab8b12 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:29 +02:00
Michael Niedermayer
4b257fba50
avcodec/escape124: Do not return random numbers
...
Fixes: out of array access
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-6035022714634240
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-6422176201572352
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 fe6d46490f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:29 +02:00
Michael Niedermayer
d8220c4c08
avformat/avs: Check if return code is representable
...
Fixes: leak
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-6738814988320768
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 52d666edec )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:28 +02:00
Michael Niedermayer
43c3acb60e
avcodec/lcldec: Make PNG filter addressing match the code afterwards
...
Also update check accordingly
Fixes: tickets/10237/mszh_306_306_yuv422_nocompress.avi
Fixes: tickets/10237/mszh_306_306_yuv411_nocompress.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d11b8bd0c6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:28 +02:00
Michael Niedermayer
5f4b9be7e8
avformat/westwood_vqa: Check chunk size
...
the type is also changed to int as it is interpreted as int in av_get_packet()
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-6593408795279360
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-4613908817903616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5c0df3da0b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:28 +02:00
Michael Niedermayer
f74a82c052
avformat/sbgdec: Check for period overflow
...
Fixes: signed integer overflow: 4481246996173000000 - -4778576820000000000 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-5063670588899328
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 a9137110ed )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:27 +02:00
Michael Niedermayer
f9d854be1e
avcodec/xvididct: Fix integer overflow in idct_row()
...
Fixes: signed integer overflow: 1871429831 + 343006811 cannot be represented in type 'int'
Fixes: 61784/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-5372151001120768
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 b12444fe72 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:27 +02:00
Michael Niedermayer
75be1f9a18
avcodec/celp_math: avoid overflow in shift
...
by making gain unsigned we have 1 bit more available
alternatively we can clip twice as in the g729 reference
Fixes: left shift of 23404 by 17 places cannot be represented in type 'int'
Fixes: 61728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-6280412547383296
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 6580a7b2b2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:27 +02:00
Michael Niedermayer
76c37f668a
avformat/format: Stop reading data at EOF during probing
...
Issue found by: Сергей Колесников
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 80f6e0378b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:26 +02:00
Michael Niedermayer
d3071db595
avcodec/huffyuvdec: avoid undefined behavior with get_vlc2() failure
...
Fixes: left shift of negative value -1
Fixes: 59889/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HUFFYUV_fuzzer-5472742275940352
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 90647a9249 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:26 +02:00
Michael Niedermayer
b9bf29ea77
avcodec/cscd: Fix "CamStudio Lossless Codec 1.0" gzip files
...
Fixes: tickets/10241/cscd_1_0_306_306_gzip.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ab7d38f970 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:26 +02:00
Michael Niedermayer
545b76d7b1
avcodec/cscd: Check for CamStudio Lossless Codec 1.0 behavior in end check of LZO files
...
Alternatively the check could be simply made more tolerant
Fixes: Ticket10227
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d2a0464fc2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:25 +02:00
Michael Niedermayer
938a762473
avcodec/hevcdec: Fix undefined memcpy()
...
There is likely a better way to fix this, this is mainly to show the problem
Fixes: MC within same frame resulting in overlapping memcpy()
Fixes: 60189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4992746590175232
Fixes: 61753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5022150806077440
Fixes: 58062/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4717458841010176
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 94bd1796ff )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:25 +02:00
Michael Niedermayer
c4a7dbdbee
avcodec/mpeg4videodec: more unsigned in amv computation
...
Fixes: signed integer overflow: -2147483648 + -1048576 cannot be represented in type 'int'
Fixes: 59365/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-642654923954585
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 0adaa90d89 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:25 +02:00
Michael Niedermayer
7e27518e98
avcodec/tta: fix signed overflow in decorrelate
...
Fixes: signed integer overflow: 2079654542 - -139267653 cannot be represented in type 'int'
Fixes: 60811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5915858409750528
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 283bf5c35b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:24 +02:00
Michael Niedermayer
3e3fc9fce4
avcodec/xvididct: Fix integer overflow in idct_row()
...
Fixes: signed integer overflow: -1403461578 + -843974775 cannot be represented in type 'int'
Fixes: 60868/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-4599793035378688
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 0ce322a51e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:24 +02:00
Michael Niedermayer
8da2dda09d
avformat/avr: Check sample rate
...
Fixes: 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592
Fixes: Timeout
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 32556fa62b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:24 +02:00
Michael Niedermayer
fd600a9cc1
avcodec/jpeg2000dec: Check for reduction factor and image offset
...
This combination is not working (it writes out of array)
Reviewed-by: Tomas Härdin <git@haerdin.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9b6d191a66 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:23 +02:00
Michael Niedermayer
8fcef8c827
avutil/softfloat: Basic documentation for av_sincos_sf()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4aa1a42a91 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:23 +02:00
Michael Niedermayer
4dc321c1eb
avutil/softfloat: fix av_sincos_sf()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d84677abd8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:23 +02:00
Michael Niedermayer
201c74b33d
avcodec/utils: fix 2 integer overflows in get_audio_frame_duration()
...
Fixes: signed integer overflow: 256 * 668003712 cannot be represented in type 'int'
Fixes: 59819/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-4674636538052608
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 a4bf559683 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:22 +02:00
Michael Niedermayer
e6f1bbc5db
avcodec/hevcdec: Avoid null pointer dereferences in MC
...
Fixes: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffff8
Fixes: 58440/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5956015530311680
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 a0f4d4e650 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:22 +02:00
Michael Niedermayer
a18761a9fc
avcodec/takdsp: Fix integer overflows
...
Fixes: avcodec/takdsp.c:44:23: runtime error: signed integer overflow: -2097158 - 2147012608 cannot be represented in type 'int'
Fixes: 58417/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5268919664640000
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 ff8a496d41 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:22 +02:00
Michael Niedermayer
21b551011a
avcodec: Ignoring errors is only possible before the input end
...
Fixes: out of array read
Fixes: Ticket 10308
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit fead656a7b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:21 +02:00
Michael Niedermayer
1658316c83
avcodec/noise_bsf: Check for wrapped frames
...
Wrapped frames contain pointers so they need specific code to
noise them, the generic code would lead to segfaults
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0889ebc577 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:21 +02:00
Michael Niedermayer
49f063c5c9
avformat/wavdec: Check that smv block fits in available space
...
Fixes: OOM
Fixes: 56271/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5290810045497344
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 a76efafdb9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:21 +02:00
Michael Niedermayer
971f208ab3
avcodec/tak: Check remaining bits in ff_tak_decode_frame_header()
...
Fixes: out of array access
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-6682195323650048
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 19b66b89da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:20 +02:00
Michael Niedermayer
11f241c02e
avcodec/utils: the IFF_ILBM implementation assumes that there are a multiple of 16 allocated
...
Fixes: out of array access
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5124452659888128
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6362836707442688
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 34056a94ea )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:20 +02:00
Michael Niedermayer
42451dd791
avcodec/vorbisdec: Check codebook float values to be finite
...
Fixes: Timeout
Fixes: 55116/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-4572159970508800
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cadd7e7a75 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:20 +02:00
Michael Niedermayer
a2d1a8c78b
avcodec/g2meet: Replace fake allocation avoidance for framebuf
...
framebuf is only allocated when the new width/height are larger than the old
but nothing sets the old so its always allocated.
Use av_fast_mallocz() instead.
Fixes: Timeout
Fixes: 55094/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5116909932904448
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 38adbc6eeb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:19 +02:00
Michael Niedermayer
06c5d528aa
avcodec/lcldec: More space for rgb24
...
Fixes: Ticket 10239
Fixes: zlib_306_306_rgb24.av
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e2c3aa8e2b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:19 +02:00
Michael Niedermayer
77846c39fc
avcodec/lcldec: Support 4:1:1 and 4:2:2 with odd width
...
Fixes: Ticket10240
Fixes: zlib_306_306_yuv422.avi
Fixes: zlib_306_306_yuv411.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0cf1ac905d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:19 +02:00
Michael Niedermayer
c0466e0214
libavcodec/lcldec: width and height should not be unsigned
...
Computations like col < width - 3 will not work with unsigned width=1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3eb4e28c26 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 22:12:18 +02:00
Rémi Denis-Courmont
4cfb8dbe10
avcodec/x86/mathops: clip constants used with shift instructions within inline assembly
...
Fixes assembling with binutil as >= 2.41
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit effadce6c7 )
2024-04-03 18:52:12 -03:00
Eugene Zemtsov
f3ed17ef4f
avformat/mov: Check if a key is longer than the atom containing it
...
Stop reading keys and return AVERROR_INVALIDDATA if key_size
is larger than the amount of space left in the atom.
Bug: https://crbug.com/41496983
Signed-off-by: Eugene Zemtsov <eugene@chromium.org >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 8a23a145d8 )
2024-04-02 09:20:48 -03:00
Timo Rothenpieler
197f7eacf6
avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointer
2024-03-30 00:28:16 +01:00
James Almer
ddb0efbbc1
avformat/mov: don't abort on duplicate Mastering Display Metadata boxes
...
The VP9 spec defines a SmDm box for this information, and the ISOBMFF spec defines a
mdvc one. If both are present, just ignore one of them.
This is in line with clli and CoLL boxes.
Fixes ticket #10711 .
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 189c32f536 )
2024-03-27 13:57:50 -03:00
Hendrik Leppkes
d7beb0c61f
avcodec/vdpau_mpeg4: fix order of quant matrix coefficients
...
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
2023-05-15 18:49:41 +02:00
Hendrik Leppkes
c9408c41e7
avcodec/vdpau_mpeg12: fix order of quant matrix coefficients
...
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
2023-05-15 18:49:41 +02:00
Hendrik Leppkes
84ea3afdae
avcodec/nvdec_mpeg4: fix order of quant matrix coefficients
...
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
2023-05-15 18:49:41 +02:00
Hendrik Leppkes
1c19e2c82d
avcodec/nvdec_mpeg2: fix order of quant matrix coefficients
...
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
2023-05-15 18:49:40 +02:00
Michael Niedermayer
b0fe83714b
Update for 4.2.9
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 11:01:17 +02:00
Michael Niedermayer
7c538b3370
avcodec/escape124: Check that blocks are allocated before use
...
Fixes: NULL pointer dereference
Fixes: 57819/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-5077280228769792
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 5366ae12b9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:21 +02:00
Michael Niedermayer
271b5016eb
avcodec/huffyuvdec: Fix undefined behavior with shift
...
Fixes: left shift of negative value -1
Fixes: 57554/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFVHUFF_fuzzer-4853603839115264
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 27e7857bd1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:21 +02:00
Michael Niedermayer
cc34df4f71
avcodec/j2kenc: Replace RGB24 special case by generic test
...
This fixes RGB48 with libavcodec as decoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ad4d647591 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:21 +02:00
Michael Niedermayer
f8b3acf517
avcodec/j2kenc: remove misleading pred value
...
This field is only checked for being 0 or not and not zero means 5/3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0adb375377 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:20 +02:00
Michael Niedermayer
c73a9382c6
avcodec/j2kenc: fix 5/3 DWT identifer
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f6955b6df4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:20 +02:00
Michael Niedermayer
d4d83b910a
avcodec/vp3: Check width to avoid assertion failure
...
Fixes: Assertion failure on x86-32
av_assert2(block_w * sizeof(pixel) <= FFABS(buf_linesize)); in ff_emulated_edge_mc()
Fixes: 39641/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5925660741206016
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 dab1cd2dc0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:20 +02:00
Michael Niedermayer
ed83667058
avcodec/g729postfilter: Limit shift in long term filter
...
Fixes: shift exponent 34 is too large for 32-bit type 'int'
Fixes: 57389/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-6229522659016704
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 6d1d8609ac )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:19 +02:00
Lynne
8b4c333134
configure: update copyright year
...
(cherry picked from commit 62da0b4a74 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:19 +02:00
Michael Niedermayer
0f57a289d2
avcodec/tests/snowenc: Fix 2nd test
...
(cherry picked from commit 163013c724 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:19 +02:00
Michael Niedermayer
af693e639e
avcodec/tests/snowenc: return a failure if DWT/IDWT mismatches
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 771c266c0b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:18 +02:00
Michael Niedermayer
f36a243c04
avcodec/snowenc: Fix visual weight calculation
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5b5fcadea0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:18 +02:00
Michael Niedermayer
022eee9ad9
avcodec/tests/snowenc: unbreak DWT tests
...
the IDWT data type mismatched current code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8b3351bbea )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:18 +02:00
Jiasheng Jiang
b2e1ee39f5
avcodec/vp3: Add missing check for av_malloc
...
Since the av_malloc() may fail and return NULL pointer,
it is needed that the 's->edge_emu_buffer' should be checked
whether the new allocation is success.
Fixes: d14723861b ("VP3: fix decoding of videos with stride > 2048")
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn >
(cherry picked from commit 656cb0450a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:17 +02:00
Michael Niedermayer
ba1da094c9
avcodec/escape124: Fix some return codes
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 98df605f7a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:17 +02:00
Michael Niedermayer
82f79dd77f
avcodec/escape124: fix signdness of end of input check
...
Fixes: Timeout
Fixes: 56561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-5560363635834880
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 87ad0a5dd7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:17 +02:00
Michael Niedermayer
a5930f4368
Use https for repository links
...
Reviewed-by: Stefano Sabatini <stefasab@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 011f30fc82 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:16 +02:00
Michael Niedermayer
8215c6b21c
avcodec/motionpixels: Mask pixels to valid values
...
Fixes: out of array access
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-6724203352555520
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 ac6eec1fc2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:16 +02:00
Michael Niedermayer
fbe41b907a
avcodec/xpmdec: Check size before allocation to avoid truncation
...
Fixes:OOM
Fixes:out of array access (no testcase)
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XPM_fuzzer-6573323838685184
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 95f0f84dae )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:16 +02:00
Michael Niedermayer
83e73df00e
avcodec/bink: Avoid undefined out of array end pointers in binkb_decode_plane()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ea9deafd3b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:15 +02:00
Michael Niedermayer
7cba5ebd7d
avcodec/bink: Fix off by 1 error in ref end
...
Fixes: out of array access
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-6657932926517248
Alterantivly to this it is possibly to allocate a bigger array
Note: oss-fuzz assigned this issue to a unrelated theora bug so the bug number matches that
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 49487045dd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:15 +02:00
Michael Niedermayer
94687a5eff
avcodec/utils: Ensure linesize for SVQ3
...
Fixes: Assertion block_w * sizeof(uint8_t) <= ((buf_linesize) >= 0 ? (buf_linesize) : (-(buf_linesize))
Fixes: 54861/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-5352418248622080
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 4eef658ca5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:15 +02:00
Michael Niedermayer
0c30285132
avcodec/utils: allocate a line more for VC1 and WMV3
...
Fixes: out of array read on 32bit
Fixes: 54857/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5840588224462848
The chroma MC code reads over the currently allocated frame.
Alternative fixes would be allocating a few bytes more at the end instead of a whole
line extra or to adjust the threshold where the edge emu code is activated
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 01636a63d4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:14 +02:00
Michael Niedermayer
ed78f71c6a
avcodec/videodsp_template: Adjust pointers to avoid undefined pointer things
...
Fixes: subtraction of unsigned offset from 0xf6602770 overflowed to 0xf6638c80
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-495074400600064
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 f0150cd41c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:14 +02:00
Michael Niedermayer
6875531f44
avcodec/pngdec: Check deloco index more exactly
...
Fixes: out of array access:
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-6716193709096960
Alternatively it should be possible to limit this to 3 plane RGB 8 /16bit to ensure the size is what it should be
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 d5bae70406 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:14 +02:00
Michael Niedermayer
747cefb8e6
avcodec/ffv1dec: Check that num h/v slices is supported
...
Fixes: out of array access
Fixes: 55597/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4898293416329216
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 8ead0ae68e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:13 +02:00
Michael Niedermayer
26a98f0dba
avformat/mov: Check samplesize and offset to avoid integer overflow
...
Fixes: signed integer overflow: 9223372036854775584 + 536870912 cannot be represented in type 'long'
Fixes: 55844/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-510613920664780
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 53c1f5c2e2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:13 +02:00
Michael Niedermayer
1e6d77a4ce
avcodec/pictordec: Remove mid exit branch
...
This causes the RLE decoder to exit before applying the last RLE run
All images i tested with are unchanged, this makes the special case
for handling the last run unused for non truncated images.
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 88f0e05c72 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:13 +02:00
Michael Niedermayer
f952c536ef
avcodec/eac3dec: avoid float noise in fixed mode addition to overflow
...
Fixes: 2.28595e+09 is outside the range of representable values of type 'int'
Fixes: 54644/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4816961584627712
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 2f48d227c1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:12 +02:00
Michael Niedermayer
22cca60c21
avcodec/utils: use 32pixel alignment for bink
...
bink supports 16x16 blocks in chroma planes thus we need to allocate enough.
Fixes: out of array access
Fixes: 55026/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-6013915371012096
Reviewed-by: Peter Ross <pross@xvid.org >
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 b95b2c8492 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:12 +02:00
Michael Niedermayer
1f8a4e35a1
avcodec/scpr3: Check bx
...
Fixes: Out of array access
Fixes: 55102/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4877396618903552
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 cc7e984a05 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:12 +02:00
Michael Niedermayer
85b4c5c106
avcodec/012v: Order operations for odd size handling
...
Fixes: out of array access
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZERO12V_fuzzer-6714182078955520.fuzz
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZERO12V_fuzzer-6698145212137472.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 4d42d82563 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:11 +02:00
Michael Niedermayer
102384cd7d
avcodec/eatgq: : Check index increments in tgq_decode_block()
...
Fixes: out of array access
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGQ_fuzzer-6743211456724992
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 e7755b433e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:11 +02:00
Michael Niedermayer
5cc68bb176
avcodec/scpr: Test bx before use
...
Fixes: out of array access on 32bit
Fixes: 54850/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5302669294305280
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 1b59de3770 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:11 +02:00
Michael Niedermayer
255794f034
avcodec/sunrast: Fix maplength check
...
Fixes: out of bounds read
Found-by: Ibrahim Mohamed <ielsayed@meta.com >
Reviewed-by; Ibrahim Mohamed <ielsayed@meta.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f8a2a65078 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:10 +02:00
Michael Niedermayer
e02bd11090
avcodec/wavpack: Avoid undefined shift in get_tail()
...
Fixes: left shift of 1208485947 by 1 places cannot be represented in type 'int'
Fixes: 54058/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5827521084260352
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 8374a747af )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:10 +02:00
Michael Niedermayer
9980d388b9
avformat/id3v2: Check taglen in read_uslt()
...
Fixes: Timeout (read mostly the same data repeatly)
Fixes: 52457/clusterfuzz-testcase-minimized-ffmpeg_dem_ALP_fuzzer-6610706313379840
Fixes: 53098/clusterfuzz-testcase-minimized-ffmpeg_dem_SOL_fuzzer-6481382981632000
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 a798af91d7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:10 +02:00
Michael Niedermayer
c4c1c28207
avcodec/ffv1dec: restructure slice coordinate reading a bit
...
Fixes: signed integer overflow: -1094995528 * 8224 cannot be represented in type 'int'
Fixes: 53508/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-474551033462784
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 74b6ac7ebb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:09 +02:00
Michael Niedermayer
60d1f87b30
avcodec/mlpdec: Check max matrix instead of max channel in noise check
...
This is a regression since: adaa06581c
Before this, max_channel and max_matrix_channel where compared for equality
Fixes: out of array access
Fixes: 53340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-514959011885875
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 aa79560de5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:09 +02:00
Michael Niedermayer
a604063ede
swscale/input: Use more unsigned intermediates
...
Same principle as previous commit, with sufficiently huge rgb2yuv table
values this produces wrong results and undefined behavior.
The unsigned produces the same incorrect results. That is probably
ok as these cases with huge values seem not to occur in any real
use case.
Fixes: signed integer overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ba209e3d51 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:09 +02:00
Michael Niedermayer
5f61c15e3c
avcodec/alsdec: The minimal block is at least 7 bits
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5280947fb6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:08 +02:00
Michael Niedermayer
e205351fa9
avformat/replaygain: avoid undefined / negative abs
...
Fixes: signed integer overflow: -2147483648 * 100000 cannot be represented in type 'int'
Fixes: 52060/clusterfuzz-testcase-minimized-ffmpeg_dem_MP3_fuzzer-5131616708329472
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 2532b20b17 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:08 +02:00
Michael Niedermayer
87df8385b8
swscale/output: Bias 16bps output calculations to improve non overflowing range
...
Fixes: integer overflow
Fixes: ./ffmpeg -f rawvideo -video_size 66x64 -pixel_format yuva420p10le -i ~/videos/overflow_input_w66h64.yuva420p10le -filter_complex "scale=flags=bicubic+full_chroma_int+full_chroma_inp+bitexact+accurate_rnd:in_color_matrix=bt2020:out_color_matrix=bt2020:in_range=full:out_range=full,format=rgba64[out]" -pixel_format rgba64 -map '[out]' -y overflow_w66h64.png
Found-by: Drew Dunne <asdunne@google.com >
Tested-by: Drew Dunne <asdunne@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0f0afc7fb5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:08 +02:00
Michael Niedermayer
4d5e869ea7
avcodec/speedhq: Check buf_size to be big enough for DC
...
Fixes: Timeout
Fixes: 51919/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuzzer-6023716480090112
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 9184d3d7b6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:55:07 +02:00
Michael Niedermayer
f0e536f603
avcodec/ffv1dec: Fail earlier if prior context is corrupted
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4df91e2215 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-21 01:54:53 +02:00
Timo Rothenpieler
a1b534bf83
avcodec/nvenc: fix vbv buffer size in cq mode
...
The CQ calculation gets thrown off and behaves very nonsensical
if it isn't set to 0.
2022-12-08 12:40:51 +01:00
James Almer
e228a0cccd
avcodec/mjpegenc: take into account component count when writing the SOF header size
...
Fixes ticket #10069
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 1009396953 )
2022-11-28 08:48:07 -03:00
Martin Storsjö
b4f2eb31dd
checkasm: float_dsp: Scale FLT/DBL_EPSILON sufficiently when comparing
...
As the values generated by av_bmg_get can be arbitrarily large
(only the stddev is specified), we can't use a fixed tolerance.
This matches what was done for test_vector_dmul_scalar in
38f966b222 .
This fixes the float_dsp checkasm test for some seeds, when built
with clang for mingw/x86_32.
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit 8f70e261fa )
Fixes ticket #10010
2022-11-06 20:49:24 +01:00
Martin Storsjö
9d5450b514
swscale: aarch64: Fix yuv2rgb with negative strides
...
Treat the 32 bit stride registers as signed.
Alternatively, we could make the stride arguments ptrdiff_t instead
of int, and changing all of the assembly to operate on these
registers with their full 64 bit width, but that's a much larger
and more intrusive change (and risks missing some operation, which
would clamp the intermediates to 32 bit still).
Fixes: https://trac.ffmpeg.org/ticket/9985
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit cb803a0072 )
Signed-off-by: Martin Storsjö <martin@martin.st >
2022-11-04 14:32:34 +02:00
Michael Niedermayer
4fb9e37c9f
Update for 4.2.8
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 22:09:57 +02:00
Michael Niedermayer
6447e6bb09
avformat/vividas: Check packet size
...
Fixes: signed integer overflow: 119760682 - -2084600173 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6745781167587328
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 5f44489cc5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:12 +02:00
Michael Niedermayer
23d078dbd1
avcodec/dstdec: Check for overflow in build_filter()
...
Fixes: signed integer overflow: 1917019860 + 265558963 cannot be represented in type 'int'
Fixes: 48798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-4833165046317056
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 8008940da5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:11 +02:00
Michael Niedermayer
674f7c87c9
avformat/spdifdec: Use 64bit to compute bit rate
...
Fixes: signed integer overflow: 32 * 553590816 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6564974517944320
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 4075f0cec1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:11 +02:00
Michael Niedermayer
619612ac01
avformat/rpl: Use 64bit for duration computation
...
Fixes: signed integer overflow: 24709512 * 88 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6737973728641024
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 529f64b2eb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:11 +02:00
Michael Niedermayer
caa009a3fb
avformat/xwma: Use av_rescale() for duration computation
...
Fixes: signed integer overflow: 34242363648 * 538976288 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6577923913547776
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 2c789f753c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:10 +02:00
Michael Niedermayer
3f283529f7
avformat/sdsdec: Use av_rescale() to avoid intermediate overflow in duration calculation
...
Fixes: signed integer overflow: 72128794995445727 * 240 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_SDS_fuzzer-6628185583779840
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 aa8eb1bed0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:10 +02:00
Michael Niedermayer
0a5e3c39eb
avformat/rmdec: check tag_size
...
Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6598073725353984
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 2cb7ee8a36 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:10 +02:00
Michael Niedermayer
8ab83a7714
avformat/nutdec: Check fields
...
Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6566001610719232
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 2c146406ea )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:09 +02:00
Michael Niedermayer
a3169bd843
avformat/flvdec: Use 64bit for sum_flv_tag_size
...
Fixes: signed integer overflow: 2138820085 + 16130322 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-6704728165187584
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 7124f10c1d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:09 +02:00
Michael Niedermayer
cc57578a35
avformat/dxa: avoid bpc overflows
...
Fixes: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_DXA_fuzzer-6639823726706688
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 93db0f0740 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:09 +02:00
Michael Niedermayer
bf1893f342
avformat/cafdec: Check that nb_frasmes fits within 64bit
...
Fixes: signed integer overflow: 1099511693312 * 538976288 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6565048815845376
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 d4bb4e3759 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:08 +02:00
Michael Niedermayer
0c56afb8d6
avformat/asfdec_o: Limit packet offset
...
avoids overflows with it
Fixes: signed integer overflow: 9223372036846866010 + 4294967047 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-6538296768987136
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-657169555665715
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 736e9e69d5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:08 +02:00
Michael Niedermayer
4235afc12c
avformat/ape: Check frames size
...
Fixes: signed integer overflow: 9223372036854775806 + 3 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_APE_fuzzer-6389264140599296
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 d0349c9929 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:08 +02:00
Michael Niedermayer
297ef9edd9
avformat/icodec: Check nb_pal
...
Fixes: signed integer overflow: 538976288 * 4 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_ICO_fuzzer-6690068904935424
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 db73ae0dc1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:07 +02:00
Michael Niedermayer
9053465771
avformat/aiffdec: Use 64bit for block_duration use
...
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896
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 9303ba272e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:07 +02:00
Michael Niedermayer
f129928164
avformat/aiffdec: Check block_duration
...
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896
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 1c2b6265c8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:07 +02:00
Michael Niedermayer
b6b9c173e0
avformat/mxfdec: only probe max run in
...
Suggested-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1182bbb2c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:06 +02:00
Michael Niedermayer
c75a0b98f8
avformat/mxfdec: Check run_in is within 65536
...
Fixes: signed integer overflow: 9223372036854775807 - -2146905566 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6570996594769920
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 7786097825 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:06 +02:00
Michael Niedermayer
f1e46857cc
avcodec/apedec: Fix integer overflow in filter_3800()
...
Fixes: signed integer overflow: -2147448926 + -198321 cannot be represented in type 'int'
Fixes: 48798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5739619273015296
Fixes: 48798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6744428485672960
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 f05247f6a4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:06 +02:00
Michael Niedermayer
9645062686
avcodec/tta: Check 24bit scaling for overflow
...
Fixes: signed integer overflow: -8427924 * 256 cannot be represented in type 'int'
Fixes: 48798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5409428670644224
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 3993345f91 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:05 +02:00
Michael Niedermayer
b14de343c7
avcodec/tiff: Fix loop detection
...
Fixes regression with tickets/4364/L1004220.DNG
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 43a4854510 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:05 +02:00
Michael Niedermayer
3b184fab45
libavformat/hls: Free keys
...
Fixes: memleak
Fixes: 50703/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-6399058578636800
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d32a9f3137 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:05 +02:00
Michael Niedermayer
6c6861279d
avcodec/fmvc: Move frame allocation to a later stage
...
This way more things are checked before allocation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9783749c66 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:04 +02:00
Michael Niedermayer
f7c84aa4db
avfilter/vf_showinfo: remove backspaces
...
They mess with storing editing and comparing the results
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 31581ae7ee )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:04 +02:00
Michael Niedermayer
5e6469b241
avcodec/speedhq: Check width
...
Fixes: out of array access
Fixes: 50014/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuzzer-4748914632294400
Alternatively the buffer size can be increased
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 f0395f9ef6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:04 +02:00
Michael Niedermayer
9909b41f92
avcodec/bink: disallow odd positioned scaled blocks
...
Fixes: out of array access
Fixes: 47911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-6194020855971840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b14104a637 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:03 +02:00
Michael Niedermayer
48b8139b95
avformat/asfdec_o: limit recursion depth in asf_read_unknown()
...
The threshold of 5 is arbitrary, both smaller and larger should work fine
Fixes: Stack overflow
Fixes: 50603/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-6049302564175872
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 1f1a368169 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:03 +02:00
Michael Niedermayer
54efe79ce7
doc/git-howto.texi: Document commit signing
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ced0dc807e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:03 +02:00
Michael Niedermayer
b9a50e0161
libavcodec/8bps: Check that line lengths fit within the buffer
...
Fixes: Timeout
Fixes: undefined pointer arithmetic
Fixes: 50330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EIGHTBPS_fuzzer-5436287485607936
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 2316d5ec1a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:02 +02:00
Michael Niedermayer
e84ddc90c7
libavformat/iff: Check for overflow in body_end calculation
...
Fixes: signed integer overflow: -6322983228386819992 - 5557477266266529857 cannot be represented in type 'long'
Fixes: 50112/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-6329186221948928
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 bcb4690304 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:02 +02:00
Michael Niedermayer
28f1396cfb
avformat/avidec: Prevent entity expansion attacks
...
Fixes: Timeout
Fixes no testcase, this is the same idea as similar attacks against XML parsers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f3e823c2aa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:02 +02:00
Michael Niedermayer
457941c11a
avcodec/h263dec: Sanity check against minimal I/P frame size
...
Fixes: Timeout
Fixes: 49718/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4874987894341632
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 ca4ff9c21c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:01 +02:00
Michael Niedermayer
85f1286c8f
avcodec/hevcdec: Check s->ref in the md5 path similar to hwaccel
...
This is somewhat redundant with the is_decoded check. Maybe
there is a nicer solution
Fixes: Null pointer dereference
Fixes: 49584/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5297367351427072
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 3b51e19922 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:01 +02:00
Michael Niedermayer
6b42366763
MAINTAINERS: Add ED25519 key for signing my commits in the future
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 05225180be )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:01 +02:00
Michael Niedermayer
3a41f58c94
avcodec/hevc_filter: copy_CTB() only within width&height
...
Fixes: out of array access
Fixes: 49271/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5424984922652672
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 009ef35d38 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:01 +02:00
Michael Niedermayer
1654bac49e
avformat/flvdec: Check for EOF in index reading
...
Fixes: Timeout
Fixes: 47992/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-6020443879899136
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 ceff5d7b74 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:00 +02:00
Michael Niedermayer
1b8dbd0b37
avformat/nutdec: Check get_packetheader() in mainheader
...
Fixes; Timeout
Fixes: 48794/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6524604713140224
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 b5de084aa6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:00 +02:00
Michael Niedermayer
ea1761e14d
avformat/asfdec_f: Use 64bit for packet start time
...
Fixes: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int'
Fixes: 49014/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6314973315334144
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 8ed78486fc )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:33:00 +02:00
Michael Niedermayer
52c4226a68
avcodec/lagarith: Check dst/src in zero run code
...
Fixes: out of array access
Fixes: 48799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-4764457825337344
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 9450f75974 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:59 +02:00
Michael Niedermayer
43b4d0afd5
avcodec/h264dec: Skip late SEI
...
Fixes: Race condition
Fixes: clusterfuzz-testcase-minimized-mediasource_MP2T_AVC_pipeline_integration_fuzzer-6282675434094592
Found-by: google ClusterFuzz
Tested-by: Dan Sanders <sandersd@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f7dd408d64 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:59 +02:00
Michael Niedermayer
f5c39a8672
avcodec/sbrdsp_fixed: Fix integer overflows in sbr_qmf_deint_neg_c()
...
Fixes: signed integer overflow: 2147483645 + 16 cannot be represented in type 'int'
Fixes: 46993/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-4759025234870272
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 1537f40516 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:59 +02:00
Michael Niedermayer
30dff62b4f
avfilter/vf_signature: Fix integer overflow in filter_frame()
...
Fixes: CID1403233
The second of the 2 changes may be unneeded but will help coverity
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit dd6040675e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:58 +02:00
Michael Niedermayer
ea9418debc
avformat/rtsp: break on unknown protocols
...
This function needs more cleanup and it lacks error handling
Fixes: use of uninitialized memory
Fixes: CID700776
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 73c0fd27c5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:58 +02:00
Michael Niedermayer
c7c63dead5
avcodec/hevcdsp_template: stay within tables in sao_band_filter()
...
Fixes: out of array read
Fixes: 47875/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5719393113341952
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 9c5250a561 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:58 +02:00
Michael Niedermayer
a541add1b6
avcodec/qpeldsp: copy less for the mc0x cases
...
Fixes: out of array access
Fixes: 47936/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5745039940124672
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 e690d4edf5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:57 +02:00
Michael Niedermayer
2921c393b1
avcodec/ffv1dec: Limit golomb rice coded slices to width 8M
...
This limit is possibly not reachable due to other restrictions on buffers but
the decoder run table is too small beyond this, so explicitly check for it.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b4431399ec )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:57 +02:00
Michael Niedermayer
86cbbd66cd
avformat/iff: simplify duration calculation
...
Fixes: signed integer overflow: 315680096256 * 134215943 cannot be represented in type 'long long'
Fixes: 48713/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5886272312311808
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 0740641e93 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:57 +02:00
Michael Niedermayer
3ca6eeff77
avcodec/wnv1: Check for width =1
...
The decoder only outputs pixels for width >1 images, fail early
Fixes: Timeout
Fixes: 48298/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WNV1_fuzzer-6198626319204352
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 d98d5a436a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:56 +02:00
Michael Niedermayer
7513f8c036
avcodec/ffv1dec_template: fix indention
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit eee7364c90 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:56 +02:00
Michael Niedermayer
84fbe1a05d
avformat/sctp: close socket on errors
...
This is untested as i have no testcase
Fixes: CID1302709
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c9a2996544 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:56 +02:00
Michael Niedermayer
d4dad587e6
avcodec/aasc: Fix indention
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit af2ed09220 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:55 +02:00
Michael Niedermayer
d79de91f1e
avcodec/qdrw: adjust max colors to array size
...
Fixes: out of array access
Fixes: 48429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDRAW_fuzzer-4608329791438848
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 cd847f86d3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:55 +02:00
Michael Niedermayer
0b999775a0
avcodec/alacdsp: Make intermediates unsigned
...
Fixes: signed integer overflow: -14914387 + -2147418648 cannot be represented in type 'int'
Fixes: 46464/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-474307197311385
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 8709f4c10a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:55 +02:00
Michael Niedermayer
62e2545463
avformat/aiffdec: cleanup size handling for extreem cases
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c6f1e48b86 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:54 +02:00
Michael Niedermayer
92a4adfd8c
avcodec/jpeglsdec: fix end check for xfrm
...
Fixes: out of array access
Fixes: 47871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-5646305956855808
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 6a82412bf3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:54 +02:00
Michael Niedermayer
d40c8b4202
avcodec/cdgraphics: limit scrolling to the line
...
Fixes: out of array access
Fixes: 47877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5690504626438144
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 b7e30a13d4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:54 +02:00
Michael Niedermayer
4aeea332eb
avformat/aiffdec: avoid integer overflow in get_meta()
...
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024
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 6a02de2127 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:53 +02:00
Michael Niedermayer
b928cd3bda
avformat/ape: more bits in size for less overflows
...
Fixes: signed integer overflow: 2147483647 + 3 cannot be represented in type 'int'
Fixes: 46184/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-4678059519770624
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 e5f6707a7b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:53 +02:00
Michael Niedermayer
a162f52438
avformat/bfi: Check offsets better
...
Fixes: signed integer overflow: -2145378272 - 538976288 cannot be represented in type 'int'
Fixes: 45690/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5015496544616448
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 35dc93ab44 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:53 +02:00
Michael Niedermayer
485aeea57c
avformat/asfdec_f: Check packet_frag_timestamp
...
Fixes: signed integer overflow: -9223372036854775808 - 4607 cannot be represented in type 'long'
Fixes: 45685/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5280102802391040
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 ffc8772150 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:52 +02:00
Michael Niedermayer
8987124bad
avcodec/texturedspenc: Fix indexing in color distribution determination
...
Fixes CID1396405
MSE and PSNR is slightly improved, and some noticable corruptions disappear as
well.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Marton Balint <cus@passwd.hu >
(cherry picked from commit ade36d61de )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:52 +02:00
Michael Niedermayer
c8177552a7
avformat/act: Check ff_get_wav_header() for failure
...
Fixes: missing error check
Fixes: CID717495
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5982da87e3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:52 +02:00
Michael Niedermayer
55a3423863
avfilter/vsrc_mandelbrot: Check for malloc failure
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit fbd22504c4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:51 +02:00
Michael Niedermayer
54c4f1e32b
avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements
...
Fixes: issues with non trivial linesize
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d353909e77 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:51 +02:00
Michael Niedermayer
ddc96fdb43
avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d740782701 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:51 +02:00
Michael Niedermayer
30ac63c8d2
avformat/genh: Check sample rate
...
Fixes: signed integer overflow: -2515507630940093440 * 4 cannot be represented in type 'long'
Fixes: 46318/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5009637474172928
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 a3d790f197 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-09 21:32:50 +02:00
Christopher Degawa
839f98ff67
configure: extend SDL check to accept all 2.x versions
...
sdl2 recently changed their versioning, moving the patch level to minor level
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
and have said that they will instead ship sdl3.pc for 3.0.0
Fixes ticket 9768
Signed-off-by: Christopher Degawa <ccom@randomderp.com >
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro >
2022-06-10 13:58:36 +02:00
Michael Niedermayer
55a9533952
Update for 4.2.7
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-09 23:52:36 +02:00
Paul B Mahol
7d4c2d90b3
avfilter/vf_colorspace: fix memmory leaks
...
Fixes #8303
(cherry picked from commit fddef964e8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
James Almer
3a04214c60
avformat/nutenc: don't allocate a dynamic AVIOContext if no index is going to be written
...
Fixes ticket #8295
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 1d479300cb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
c6fdee5274
avfilter/vf_random: fix memory leaks
...
Fixes #8296
(cherry picked from commit 3488e0977c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
6f579cf963
avfilter/vf_bwdif: fix heap-buffer overflow
...
Fixes #8261
(cherry picked from commit 8c3166e1c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Andreas Rheinhardt
a43a89a089
fftools/ffmpeg_opt: Fix leak of options when parsing options fails
...
Fixes #8094 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 21265f42ec )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
156af49b09
avfilter/vf_edgedetect: fix heap-buffer overflow
...
Fixes #8275
(cherry picked from commit de598f82f8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
e103a2cb9c
avfilter/vf_w3fdif: deny processing small videos
...
Fixes #8243
(cherry picked from commit 0e68e8c93f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
724b8fa1e2
avfilter/vf_avgblur: fix heap-buffer overflow
...
Fixes #8274
(cherry picked from commit f069a9c2a6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
7eb02a1f83
avfilter/af_tremolo: fix heap-buffer overflow
...
Fixes #8317
(cherry picked from commit 58bb9d3a3a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
ff1c55c913
avfilter/vf_edgedetect: check if height is big enough
...
Fixes #8260
(cherry picked from commit ccf4ab8c9a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
72bc9bd8ef
avfilter/vf_bitplanenoise: fix overreads
...
Fixes #8244
(cherry picked from commit 0b56723874 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
25b2341f9a
avfilter/vf_fieldorder: fix heap-buffer overflow
...
Fixes #8264
(cherry picked from commit 07050d7bdc )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
b116c7a6b0
avfilter/vf_fieldmatch: fix heap-buffer overflow
...
Also fix use of uninitialized values.
Fixes #8239
(cherry picked from commit ce5274c138 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Paul B Mahol
77b61358aa
avcodec/pngenc: remove monowhite from apng formats
...
Monowhite pixel format is not supported, and it does not make sense
to add support for it.
Fixes #7989
(cherry picked from commit 5d9f44da46 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-05-04 20:00:05 +02:00
Timo Rothenpieler
43d68a0738
lavf/tls_mbedtls: add support for mbedtls version 3
...
- certs.h is gone. Only contains test data, and was not used at all.
- config.h is renamed. Was seemingly not used, so can be removed.
- MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE is gone, instead
MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE will be thrown.
- mbedtls_pk_parse_keyfile now needs to be passed a properly seeded
RNG. Hence, move the call to after RNG seeding.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2022-04-27 18:49:49 +02:00
Michael Niedermayer
79aba62389
Changelog: update
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-16 11:01:28 +02:00
Gyan Doshi
773e4c43f6
configure: bump year
...
(cherry picked from commit 2f6360ff21 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-16 11:00:47 +02:00
James Almer
eb42adab36
fate: update reference files after the recent dash manifest muxer changes
...
Missed in 487b49d8f2 .
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit aa0829d834 )
2022-04-08 16:11:48 -03:00
James Almer
d36f0ff69a
avformat/webmdashenc: fix on-demand profile string
...
Fixes ticket #9596
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 487b49d8f2 )
2022-04-08 00:08:40 -03:00
Michael Niedermayer
550a713791
Update for 4.2.6
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 23:56:00 +02:00
Paul B Mahol
6ac6df4e1f
avfilter/vf_lenscorrection: make width/height int
...
Somehow previous correct fix broke usage.
(cherry picked from commit 79522411fa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 23:56:00 +02:00
Michael Niedermayer
9576ed4e48
avcodec/diracdec: avoid signed integer overflow in global mv
...
Fixes: signed integer overflow: -128275513086 * -76056576 cannot be represented in type 'long'
Fixes: 45818/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5129799149944832
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 7f1279684e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
c6845555fc
avcodec/takdsp: Fix integer overflow in decorrelate_sf()
...
Fixes: signed integer overflow: -101 * 71041254 cannot be represented in type 'int'
Fixes: 45938/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-4687974320701440
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 01d8c887f6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
0c68e3455b
avcodec/apedec: fix a integer overflow in long_filter_high_3800()
...
Fixes: signed integer overflow: -2146549696 - 3923884 cannot be represented in type 'int'
Fixes: 45907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5992380584558592
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 b085b400be )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Oneric
4641d71fb0
avfilter/vf_subtitles: pass storage size to libass
...
Due to a quirk of the ASS format some tags depend on the exact storage
resolution of the video, so tell libass via ass_set_storage_size.
2022-04-07 16:27:00 +02:00
Michael Niedermayer
7b9ee6a49e
avformat/aqtitledec: Skip unrepresentable durations
...
Fixes: signed integer overflow: -5 - 9223372036854775807 cannot be represented in type 'long'
Fixes: 45665/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-475618463934054
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 c2d1597a8a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
64a756b8f5
avformat/cafdec: Do not store empty keys in read_info_chunk()
...
Fixes: Timeout
Fixes: 45543/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5684953164152832
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 7ec28e1d4c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
a882801bc3
avformat/hls: Check target_duration
...
Fixes: signed integer overflow: 77777777777777 * 1000000 cannot be represented in type 'long long'
Fixes: 45545/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-6438101247983616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a8fd3f7fab )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
4a7f3467d8
avcodec/pixlet: Avoid signed integer overflow in scaling in filterfn()
...
Fixes: signed integer overflow: 11494 * 1073741824000000 cannot be represented in type 'long'
Fixes: 26586/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5752633970917376
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 0c1f20c6c8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
f79f5a97bd
avformat/matroskadec: Check pre_ns
...
Fixes: division by 0
Fixes: 44615/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6681108677263360
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 710e51677a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
93445cbbf4
avcodec/sonic: Use unsigned for predictor_k to avoid undefined behavior
...
Fixes: signed integer overflow: -1094995529 * 24 cannot be represented in type 'int'
Fixes: 44436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-4874459459223552
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 28008bf95e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
a0fa20bae4
avformat/matroskadec: Use rounded down duration in get_cue_desc() check
...
Floating point is evil, it would be better if duration was not a double
Fixes: Infinite loop
Fixes: 45123/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6725052291219456
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 bd3a03db9a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
78707ae025
avformat/avidec: Check height
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: Ticket8486
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ec8ff659f5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
27ed2b5bd8
avformat/rmdec: Better duplicate tags check
...
Fixes: memleaks
Fixes: 44810/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5619494647627776
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 15a646e501 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
a09bc161b0
avformat/mov: Disallow empty sidx
...
It appears this is not allowed "Each Segment Index box documents how a (sub)segment is divided into one or more subsegments
(which may themselves be further subdivided using Segment Index boxes)."
Fixes: Null pointer dereference
Fixes: Ticket9517
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4419433d77 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
084b4f82a3
avformat/matroskadec: Check duration
...
Fixes: -nan is outside the range of representable values of type 'long'
Fixes: 44614/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6216204841254912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 36680078ca )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
bc56a27094
avformat/mov: Corner case encryption error cleanup in mov_read_senc()
...
Fixes: memleak
Fixes: 42341/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4566632823914496
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 8ee0e4abcb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
51bc510327
avcodec/jpeglsdec: Fix if( code style
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f306b8e80a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
bf1df43681
avcodec/jpeglsdec: Check get_ur_golomb_jpegls() for error
...
Fixes: Timeout
Fixes: Invalid shift
Fixes: 44548/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-556487680891289
Fixes: 44569/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-6302543246917632
Fixes: 44570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-4550196556595200
Fixes: 44592/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5651610385121280
Fixes: 44571/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5094698987945984
Fixes: 44607/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5341352013987840
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 151f83584e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
05067fe680
avcodec/motion_est: fix indention of ff_get_best_fcode()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ce43e1c581 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
8c5f441a0d
avcodec/motion_est: Fix xy indexing on range violation in ff_get_best_fcode()
...
This codepath seems untested, no testcases change
Found-by: <mkver>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 634312a70f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
e13aba0023
avcodec/jpeglsdec: Increase range for N in ls_get_code_runterm() by using unsigned
...
Fixes: left shift of 32768 by 16 places cannot be represented in type 'int'
Fixes: Timeout
Fixes: 44219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4679455379947520
Fixes: 44088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4885976600674304
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 6ee283d7d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
fd062924b8
avformat/matroskadec: Check desc_bytes
...
Fixes: Division by 0
Fixes: 44035/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4826721386364928
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 5038933977 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
c6c36aa97a
avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value()
...
Fixes: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffff
Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5670607746891776
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 59328aabd2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
94fc589f8e
avformat/matroskadec: Fix infinite loop with bz decompression
...
The same check is added to zlib too, it seems not needed there though
Fixes: Infinite loop
Fixes: 43932/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6175167573786624
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9c3d2cbb51 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
b8492ff76d
avformat/mov: Check size before subtraction
...
Fixes: signed integer overflow: -9223372036854775808 - 8 cannot be represented in type 'long'
Fixes: 43542/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5237670148702208
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 d8d9d506a3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
7a9dfc503d
avcodec/apedec: Fix integer overflows in predictor_update_3930()
...
Fixes: signed integer overflow: 1074134419 - -1075212485 cannot be represented in type 'int'
Fixes: 43273/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4706880883130368
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 0c9c9bbd01 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
770e373ca2
avcodec/apedec: fix integer overflow in 8bit samples
...
Fixes: signed integer overflow: 2147483542 + 128 cannot be represented in type 'int'
Fixes: 42812/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6344057861832704
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 7cee3b3718 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
f8bbc2ced3
avformat/flvdec: timestamps cannot use the full int64 range
...
We do not support this as we multiply by 1000
Fixes: signed integer overflow: -45318575073853696 * 1000 cannot be represented in type 'long'
Fixes: 42804/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-4630325425209344
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 c217ca7718 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
c202ffefaa
avcodec/vqavideo: reset accounting on error
...
Fixes: Timeout (same growing chunk is decoded to failure repeatedly)
Fixes: 42582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6531195591065600
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 d8ea7a67ba )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
fd854bced1
avcodec/alacdsp: fix integer overflow in decorrelate_stereo()
...
Fixes: signed integer overflow: -16777216 * 131 cannot be represented in type 'int'
Fixes: 23835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5669943160078336
Fixes: 41101/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-4636330705944576
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 68457c1e85 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
fccff20bdd
avformat/4xm: Check for duplicate track ids
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit dd94912479 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
f34273703b
avformat/4xm: Consider max_streams on reallocating tracks array
...
Fixes: OOM
Fixes: 41595/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-6355979363549184
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 0dcd95ef8a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
2aefb4b7ac
avformat/mov: Check next offset in mov_read_dref()
...
Fixes: signed integer overflow: 9223372036200463215 + 1109914409 cannot be represented in type 'long'
Fixes: 41480/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6553086177443840
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 562021e2fd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
a962cda7fd
avformat/vivo: Favor setting fps from explicit fractions
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bf1e93bdc9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
6cbacf1818
avformat/vivo: Do not use the general expression evaluator for parsing a floating point value
...
Fixes: Timeout
Fixes: 41564/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-6309014024093696
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 7b24615565 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
e94ae6c679
avformat/mxfdec: Check for duplicate mxf_read_index_entry_array()
...
Fixes: memleak
Fixes: 41596/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6439060204290048
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 >
(cherry picked from commit 4f44a218e5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
24f5e3a191
avcodec/apedec: Change avg to uint32_t
...
Fixes: Integer overflow
Fixes: 40973/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6739312704618496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0ec75723a4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:27:00 +02:00
Michael Niedermayer
1f62d58dae
avformat/mov: Disallow duplicate smdm
...
Fixes: memleak
Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968
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 b5ba74053c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
6711c16e63
avformat/mov: Check for EOF in mov_read_glbl()
...
Fixes: Infinite loop
Fixes: 41351/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5433895854669824
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 59b4e7cbd8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
a8e6ddb5df
avcodec/vp3: Check version in all cases when VP4 code is not built
...
Fixes: out of array read
Fixes: 40284/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4599568176644096
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 96caa01f13 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
498a365d6d
avformat/mov: Check channels for mov_parse_stsd_audio()
...
Fixes: signed integer overflow: -776522110086937600 * 16 cannot be represented in type 'long'
Fixes: 40563/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6644829447127040
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 3a64a4c582 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
208434c164
avformat/avidec: Check read_odml_index() for failure
...
Fixes: Timeout
Fixes: 40950/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6478873068437504
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 57adb26d05 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
d2d817eaf2
avformat/aiffdec: Use av_rescale() for bitrate
...
Fixes: integer overflow
Fixes: 40313/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-4814761406103552
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 905588df97 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
ed968f5290
avformat/aiffdec: sanity check block_align
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 93f7776921 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
f2a206309e
avformat/aiffdec: Check sample_rate
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1b04836dff )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Paul B Mahol
84fdfdf859
avfilter/vf_gblur: fix heap-buffer overflow
...
Fixes #8282
(cherry picked from commit 64a805883d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Paul B Mahol
15900ff8e6
avfilter/vf_lenscorrection: fix division by zero
...
Fixes #8265
(cherry picked from commit 19587c9332 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
James Almer
c4629d8abe
avformat/latmenc: abort if no extradata is available
...
Fixes ticket #8273 .
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit dd01947397 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Andreas Rheinhardt
c55cf1d0cc
avformat/movenc: Fix segfault when remuxing rtp hint stream
...
When remuxing an rtp hint stream (or any stream with the tag "rtp "),
the mov muxer treats this as one of the rtp hint tracks it creates
internally when ordered to do so; yet this track lacks the
AVFormatContext for the hinting rtp muxer, leading to segfaults in
mov_write_udta_sdp() if a "trak" atom is written for this stream; if not,
the stream's codecpar is freed by mov_free() as if the mov muxer owned
it (it does for the internally created "rtp " tracks), but without
resetting st->codecpar, leading to double-frees lateron. This commit
therefore ignores said tag which makes rtp hint streams unremuxable.
This fixes tickets #8181 and #8186 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
(cherry picked from commit 22c3cd1760 )
2022-04-07 16:26:59 +02:00
Paul B Mahol
f126288f23
avformat/tty: add probe function
...
(cherry picked from commit 3bce9e9b3e )
2022-04-07 16:26:59 +02:00
Paul B Mahol
98981312e1
avfilter/vf_neighbor: check if width is 1
...
Fixes #8242
(cherry picked from commit e787f8fd7e )
2022-04-07 16:26:59 +02:00
Michael Niedermayer
d1cdfe78cf
avcodec/flac_parser: Consider AV_INPUT_BUFFER_PADDING_SIZE
...
Fixes: out if array read
Fixes: 40109/clusterfuzz-testcase-minimized-ffmpeg_dem_FLAC_fuzzer-4805686811295744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Mattias Wadman <mattias.wadman@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
77fc0df720
avcodec/ttadsp: Fix integer overflows in tta_filter_process_c()
...
Fixes: signed integer overflow: 822841647 + 1647055738 cannot be represented in type 'int'
Fixes: 39935/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-4592657142251520
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 f24028c798 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Michael Niedermayer
ffcba1be9a
avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e154353fdb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-07 16:26:59 +02:00
Andreas Rheinhardt
bf85c589d7
configure: Add missing libshine->mpegaudioheader dependency
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
(cherry picked from commit e228d7b0db )
2022-01-06 08:46:55 +01:00
Michael Niedermayer
60037d6693
Changelog: update
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:47:10 +02:00
Lynne
a9febd5870
configure: update copyright year
...
(cherry picked from commit 63505fc60a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
c0b6f4b38d
avformat/matroskadec: Reset state also on failure in matroska_reset_status()
...
The calling code does not handle failures and will fail with assertion failures later.
Seeking can always fail even when the position was previously read.
Fixes: Assertion failure
Fixes: 35253/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-4693059982983168
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 d115eec979 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
2d993f5fd6
avformat/wavdec: Check smv_block_size
...
Fixes: Timeout
Fixes: 39554/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-4915221701984256
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 849138f476 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
707d85b356
avformat/rmdec: Check for multiple audio_stream_info
...
Fixes: memleak
Fixes: 39166/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5153276690038784
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 8fe3566b8f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
523098c8b9
avcodec/apedec: Use 64bit to avoid overflow
...
Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be represented in type 'int'
Fixes: 39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702
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 f059b56195 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
3055a0155b
avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
...
Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int'
Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208
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 ad517ee6e4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
501f0aef5d
oavformat/avidec: Check offset in odml
...
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long'
Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480
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 255a7b423e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Michael Niedermayer
bbbde5f077
avformat/mpegts: use actually read packet size in mpegts_resync special case
...
Fixes: infinite loop
Fixes: 37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528 -
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 83b2e4c8f1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-12 16:46:06 +02:00
Timo Rothenpieler
2e68ac694c
avfilter/scale_npp: fix non-aligned output frame dimensions
2021-10-07 18:29:08 +02:00
Michael Niedermayer
a7be534d8a
Update for 4.2.5
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 14:26:23 +02:00
Michael Niedermayer
ff87b7bd2f
swscale/alphablend: Fix slice handling
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 06d6726588 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
838c34ec53
avcodec/mxpegdec: Check for AVDISCARD_ALL
...
Fixes: Fixes NULL pointer dereference
Fixes: 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712
Fixes: 37907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-4725170850365440
Fixes: 37904/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6367889262247936
Fixes: 38085/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5175270823297024
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 20afd3a63a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
01b228834a
avcodec/flicvideo: Check remaining bytes in FLI*COPY
...
Fixes: Timeout
Fixes: 37795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-4846536543043584
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 5f835efbca )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
8b8ab274af
avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127
...
Fixes: index 128 out of bounds for type 'uint16_t [128]'
Fixes: 38651/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6296416058736640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 85413a5ae6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
6edcacf465
avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return
...
Fixes: invalid shift
Fixes: 37018/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG2VIDEO_fuzzer-5290280902328320
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 5a95abcce4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
10226f869e
avcodec/mpegvideo_enc: Limit bitrate tolerance to the representable
...
Fixes: error: 1.66789e+11 is outside the range of representable values of type 'int'
Fixes: Ticket8201
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 245017ec8a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
29f073ca46
avcodec/apedec: Fix integer overflow in intermediate
...
Fixes: signed integer overflow: 559334865 * 4 cannot be represented in type 'int'
Fixes: 37929/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6751932295806976
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 90da43557f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
c8b796b472
avformat/mvdec: Do not set invalid sample rate
...
Fixes: signed integer overflow: -682581959642593728 * 16 cannot be represented in type 'long'
Fixes: 37883/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5311691517198336
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 737e6bf216 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
c5d07ade3e
avformat/rmdec: Use 64bit for intermediate for DEINT_ID_INT4
...
Fixes: runtime error: signed integer overflow: 65312 * 65535 cannot be represented in type 'int'
Fixes: 32832/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-4817710040088576
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 e2c2872393 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:59:34 +02:00
Michael Niedermayer
cd5c9b590d
avformat/mov: Check for duplicate clli
...
Fixes: memleak
Fixes: 35261/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4869656287510528
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 9a222f140e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
261e06947e
avformat/jacosubdec: Check for min in t overflow in get_shift()
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 34651/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5157941012463616
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 989febfbd0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
78706c08d9
avformat/mxfdec: check channel number in mxf_get_d10_aes3_packet()
...
Fixes: Out of array access
Fixes: 37030/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5387719147651072
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 >
(cherry picked from commit 3dd5a8a135 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
James Almer
d17624507a
avcodec/utils: don't return negative values in av_get_audio_frame_duration()
...
In some extrme cases, like with adpcm_ms samples with an extremely high channel
count, get_audio_frame_duration() may return a negative frame duration value.
Don't propagate it, and instead return 0, signaling that a duration could not
be determined.
Fixes ticket #9312
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit e01d306c64 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
cfb2b5db9e
avcodec/jpeg2000dec: Check that atom header is within bytsetream
...
Fixes: Infinite loop
Fixes: 36666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5912760671141888
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 3c659f8618 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
6b34dd48ad
avcodec/apedec: Fix 2 integer overflows in filter_3800()
...
Fixes: signed integer overflow: 1683879955 - -466265224 cannot be represented in type 'int'
Fixes: 37419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6074294407921664
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 33feb527ff )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
5e73b973c5
avcodec/xpmdec: Move allocations down after more error checks
...
Fixes: Timeout
Fixes: 37035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XPM_fuzzer-5142718576721920
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 e58692837c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Martin Storsjö
e4e6a3fbcc
network: Define ENOTCONN as WSAENOTCONN if not defined
...
This fixes compilation with old mingw.org toolchains, which has got
much fewer errno.h entries.
Signed-off-by: Martin Storsjö <martin@martin.st >
(cherry picked from commit 6569e9505c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
295597b749
avformat/avidec: Use 64bit for frame number in odml index parsing
...
Fixes: signed integer overflow: 1179337772 + 1392508928 cannot be represented in type 'int'
Fixes: 34088/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5846945303232512
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 a4c98c507e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
a55db635fd
avcodec/mjpegbdec: Skip SOS on AVDISCARD_ALL as does mjpeg
...
Fixes: NULL pointer dereference
Fixes: 36342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-4579188072906752
Fixes: 36344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5049579300061184
Fixes: 36345/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5301149845553152
Fixes: 36374/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-6056312352931840
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 104a8399ae )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
78e045df38
avcodec/mjpegdec: Check for bits left in mjpeg_decode_scan_progressive_ac()
...
Fixes: Timeout
Fixes: 36262/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-4969052454912000
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 909faca929 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
maryam ebrahimzadeh
5976047ae0
avformat/adtsenc: return value check for init_get_bits in adts_decode_extradata
...
As the second argument for init_get_bits (buf) can be crafted, a return value check for this function call is necessary.
'buf' is part of 'AVPacket pkt'.
replace init_get_bits with init_get_bits8.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9ffa49496d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
5e2aae4c73
avcodec/webp: Check available space in loop in decode_entropy_coded_image()
...
Fixes: Timeout
Fixes: 35401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WEBP_fuzzer-5714401821851648
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 5e00eab611 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:56:53 +02:00
Michael Niedermayer
3dbc3d7aa3
avcodec/vc1dec: ff_print_debug_info() does not support WMV3 field_mode
...
Fixes: out of array read
Fixes: 36331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-5140494328922112.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 c59b5e3d1e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
0f8a56d5af
avcodec/frame_thread_encoder: Free AVCodecContext structure on error during init
...
Fixes: MemLeak
Fixes: 8281
Fixes: PoC_option158.jpg
Fixes: CVE-2020-22037
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7bba0dd638 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
bcb56d512b
avcodec/faxcompr: Check for end of input in cmode == 1 in decode_group3_2d_line()
...
Fixes: Infinite loop
Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272
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 f803635c4f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
62ec07a948
avcodec/vc1dec: Disable error concealment for *IMAGE
...
The existing error concealment makes no sense for the image formats, they
use transformed source images which is different from keyframe + MC+difference
for which the error concealment is designed.
Of course feel free to re-enable this if you have a case where it works and
improves vissual results
Fixes: Timeout
Fixes: 36234/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-6300306743885824
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 643b2d49bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
cbe02fb860
avcodec/sbrdsp_fixed: Fix negation overflow in sbr_neg_odd_64_c()
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 35593/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5182217725804544
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 8f2856a1da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
ab78ddd4c1
avformat/wtvdec: Check for EOF before seeking back in parse_media_type()
...
Fixes: Infinite loop
Fixes: 36311/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-4889181296918528
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 89505d38de )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
1f1318971e
avformat/wavdec: Use 64bit in new_pos computation
...
Fixes: signed integer overflow: 129 * 16711680 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6742285317439488
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 9b57d2f0a9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
afcd295bb0
avformat/sbgdec: Check for overflow in timestamp preparation
...
Fixes: signed integer overflow: 9223372036854775807 + 86400000000 cannot be represented in type 'long'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6731040263634944
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 9dbed90840 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
13d9666b5e
avformat/dsicin: Check packet size for overflow
...
Fixes: signed integer overflow: 24672 + 2147483424 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_DSICIN_fuzzer-6731325979623424
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 9d1c47ec03 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
18df459002
avformat/bfi: check nframes
...
Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6737028768202752
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 b4e77dfca1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
baa941a5f9
avformat/avidec: fix position overflow in avi_load_index()
...
Fixes: signed integer overflow: 9223372033098784808 + 4294967072 cannot be represented in type 'long'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6732488912273408
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 527821a2dd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
ef74f8b75f
avformat/asfdec_f: Check sizeX against padding
...
Fixes: signed integer overflow: 2147483607 + 64 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6753897878257664
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 f034c2e36a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
99c8690870
avformat/aiffdec: Check for size overflow in header parsing
...
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6723467048255488
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 bae2e19777 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
9410be6ddd
avcodec/aaccoder: Add minimal bias in search_for_ms()
...
Fixes: floating point division by 0
Fixes: Ticket8218
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 75a099fc73 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
3d3a60533b
avfilter/af_drmeter: Check that there is data
...
Fixes: floating point division by 0
Fixes: -nan is outside the range of representable values of type 'int'
Fixes: Ticket8307
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4f49fa6abe )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
853147f753
avfilter/vf_mestimate: Check b_count
...
Fixes: left shift of negative value -1
Fixes: Ticket8270
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 06af6e101b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
22fa7efe02
avformat/mov: do not ignore errors in mov_metadata_hmmt()
...
Fixes: Timeout
Fixes: 35637/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6311060272447488
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 c52c99a18f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
6d72fc6be2
avformat/mxfdec: Check size for shrinking
...
av_shrink_packet() takes int size, so size must fit in int
Fixes: out of array access
Fixes: 35607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4875541323841536
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 65b862ab59 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
maryam ebr
796a84fd04
avcodec/dnxhddec: check and propagate function return value
...
Similar to CVE-2013-0868, here return value check for 'init_vlc' is needed.
crafted DNxHD data can cause unspecified impact.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit 7150f95756 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
d3f9206997
swscale/slice: Fix wrong return on error
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7874d40f10 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
b72df5e492
swscale/slice: Check slice for allocation failure
...
Fixes: null pointer dereference
Fixes: alloc_slice.mp4
Found-by: Rafael Dutra <rafael.dutra@cispa.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 997f9cfc12 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
452e7cba2c
avformat/matroskadec: Fix handling of huge default durations
...
Fixes: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself
Fixes: 33997/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6752039691485184
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 343d950a4a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
4596eefd83
avcodec/lpc: check for zero err in normalization in compute_lpc_coefs()
...
Fixes: floating point division by 0
Fixes: Ticket8213
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 70874e024a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
2104bed562
avformat/ftp: Check for av_strtok() failure
...
Fixes: CID1396258 Dereference null return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9d40782088 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
5baa775675
tools/cws2fws: Check read() for failure
...
Fixes: CID1452579 Argument cannot be negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0b3cdd7cc2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
81bddb1859
avcodec/cpia: Fix missing src_size update
...
Fixes: out of array read
Fixes: 35210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CPIA_fuzzer-5669199688105984
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 cea05864e6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
f806412b00
avcodec/clearvideo: Check tile_size to be not too large
...
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 35023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-6740166587842560
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 11fac9613e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
22ae198e0c
avcodec/utils: Use 64bit for intermediate in AV_CODEC_ID_ADPCM_THP* duration calculation
...
Fixes: signed integer overflow: 486539264 * 14 cannot be represented in type 'int'
Fixes: 35281/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6068262742917120
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 00ae9b77ef )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
5d7fbb35d3
avformat/rmdec: Check old_format len for overflow
...
Maybe such large values could be disallowed earlier and closer to where
they are set.
Fixes: signed integer overflow: 538976288 * 8224 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6704350354341888
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 06d174e289 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
8b8e5ccdc2
avformat/realtextdec: Check the pts difference before using it for the duration computation
...
Fixes: signed integer overflow: 5404200000 - -9223372031709351616 cannot be represented in type 'long'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_REALTEXT_fuzzer-6737340551790592
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 fe12aa6890 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
7da58f8fe7
avformat/qcp: Avoid negative nb_rates
...
Fixes: signed integer overflow: 2 * -1725947872 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_QCP_fuzzer-6726807632084992
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 1b865cc703 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
dda8d338a1
avformat/nutdec: Check tmp_size
...
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6739990530883584
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 1ca00b5e44 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
ba6d58a333
avformat/msf: Check that channels doesnt overflow during extradata construction
...
Fixes: signed integer overflow: 2048 * 1122336 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_MSF_fuzzer-6726959600107520
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 a1a277926b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
e9f7f01b76
avformat/mpc8: Check for position overflow in mpc8_handle_chunk()
...
Fixes: signed integer overflow: 15 + 9223372036854775796 cannot be represented in type 'long'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6723520756318208
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6739833034768384
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 8ef25d1182 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
92214f9c1d
avformat/iff: Use 64bit in duration computation
...
Fixes: signed integer overflow: 588 * 16719904 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-6748331936186368
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 93d964689c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
fbd85a15e1
avformat/dxa: Check fps to be within the supported range more precissely
...
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: assertion failure
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_DXA_fuzzer-6744985740378112
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 6ea494befc )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
42e4597252
avcodec/iff: Only write palette to plane 1 if its PAL8
...
Fixes: null pointer passed as argument 1, which is declared to never be null
Fixes: 33791/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5107575256383488.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 216eb60b85 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
fee5c1ec54
avformat/tta: Check for EOF in index reading loop
...
Fixes: OOM
Fixes: 33585/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-4564665830080512
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 b72d657b73 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
e46fac4042
Update missed irc links
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c067d20177 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
b65f9e606a
avformat/rpl: The associative law doesnt hold for signed integers in C
...
Add () to avoid undefined behavior
Fixes: signed integer overflow: 9223372036854775790 + 57 cannot be represented in type 'long'
Fixes: 34983/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5765822923538432
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 480f11bdd7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
2955147e93
avcodec/faxcompr: Check available bits in decode_uncompressed()
...
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112
Fixes: 34966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4587409334468608
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 ff56c139e0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
2d59246341
avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10
...
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112
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 7d8421e3d5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
665192827a
avcodec/utils: do "calc from frame_bytes, channels, and block_align" in 64bit
...
Fixes: signed integer overflow: 104962766 * 32 cannot be represented in type 'int'
Fixes: 33614/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6252129036664832
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 3447979d08 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
91afefa2b6
avcodec/ttadata: Add sentinel at the end of ff_tta_shift_1
...
Fixes: out of array access
Fixes: 34933/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5629322560929792
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 dbbcfbcc4e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
95a86b7fc9
avformat/mov: Check for duplicate mdcv
...
Fixes: memleak
Fixes: 34932/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5456227658235904
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 f54d85cee6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
f747fd6d6f
avfilter/vf_dctdnoiz: Check threads
...
Fixes: floating point division by 0
Fixes: Ticket 8269
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4a3917c02c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
879ac3418e
avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black
...
Fixes: floating point division by 0
Fixes: undefined behavior in handling NaN
Fixes: Ticket 8268
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3d500e62f6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
516632359d
avformat/rpl: Check for EOF and zero framesize
...
Fixes: Infinite loop
Fixes: 34751/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5439330800762880
Fixes: 34774/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5851571660390400
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 a0a4a527c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
c86f19e47c
avcodec/vc2enc: Check for non negative slice bounds
...
Fixes: invalid shifts
Fixes: Ticket 8221
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f7862e8268 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
511989d2a7
avformat/rpl: Use 64bit in bitrate computation and check it
...
Fixes: signed integer overflow: 777777776 * 4 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-6726188921913344
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 29b244ffc1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
e01ffd6f3f
avcodec/svq1enc: Do not print debug RD value before it has been computed
...
Avoids floating point division by 0
Fixes: Ticket8191
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c297f7e57a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
4e779e4ace
avcodec/aacpsy: Check bandwidth
...
Fixes: Ticket8011
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 36dead4bc2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
ddd6d344c5
avcodec/aacenc: Do not divide by lambda_count if it is 0
...
Avoids Floating point division by 0
Fixes: Ticket8011
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c520b98691 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
92b047755e
avcodec/aacenc: Use FLT_EPSILON for lambda minimum
...
(cherry picked from commit 4b89cf7aa4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
7cc32a537b
avformat/cinedec: Fix index_entries size check
...
Fixes: out of array access
Fixes: 29868/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5692001957445632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
0ab6b4469c
avfilter/vf_yadif: Fix handing of tiny images
...
Fixes: out of array access
Fixes: Ticket8240
Fixes: CVE-2020-22021
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7971f62120 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
e6b5c7a5fc
avfilter/vf_vmafmotion: Check dimensions
...
Fixes: out of array access
Fixes: Ticket8241
Fixes: Ticket8246
Fixes: CVE-2020-22019
Fixes: CVE-2020-22033
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 82ad1b7675 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
cf876bdef8
avformat/movenc: Check pal_size before use
...
Fixes: assertion failure
Fixes: out of array read
Fixes: Ticket8190
Fixes: CVE-2020-22015
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4c1afa2925 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
196d21d7ee
avcodec/lpc: Avoid floating point division by 0
...
Fixes: Ticket7996
Fixes: CVE-2020-20445
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 38d18fb578 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
e56ee5a3e4
avcodec/aacpsy: Avoid floating point division by 0 of norm_fac
...
Fixes: Ticket7995
Fixes: CVE-2020-20446
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 223b5e8ac9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
c21762969e
avcodec/aacenc: Avoid 0 lambda
...
Fixes: Ticket8003
Fixes: CVE-2020-20453
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a7a7f32c8a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
c840ac7464
avcodec/exr: x/ymax cannot be INT_MAX
...
The code uses x/ymax + 1 so the maximum is INT_MAX-1
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 33158/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5545462457303040
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 48342aa075 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
b673bcc017
avformat/avio: Check av_opt_copy() for failure
...
Fixes: CID1477416 Unchecked return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f8611ae1ef )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
a19e2a5a94
avcodec/clearvideo: Check for 0 tile_shift
...
Fixes: shift exponent -1 is negative
Fixes: 33401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5908683596890112
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 63e75e09ae )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
9e98ee41e7
avcodec/vc1: Check remaining bits in ff_vc1_parse_frame_header()
...
Fixes: Timeout
Fixes: 33156/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-6259655027326976
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 38c4761588 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
f143bb05c6
avformat/mov: Ignore duplicate CoLL
...
Fixes: memleak
Fixes: 32146/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5377612845285376
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 9548dc74d8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
6dcff59432
avformat/mov: Limit nb_chapter_tracks to input size
...
Fixes: Timeout (15k loop iterations instead of 400m)
Fixes: 31368/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6601583174483968
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 299a56c900 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
16629cf4a6
avformat/utils: Use 64bit earlier in r_frame_rate check
...
Fixes: signed integer overflow: 1406796319 * 2 cannot be represented in type 'int'
Fixes: 32777/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5632576913014784
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 578633fc1a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
6785185ea5
avformat/mvdec: Check sample rate in parse_audio_var()
...
Fixes: signed integer overflow: -635424002382840000 * 16 cannot be represented in type 'long'
Fixes: 33612/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5704741108711424
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 0ff60249a5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
4a688d139b
avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line()
...
Fixes: infinite loop
Fixes: 33674/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4816457818046464
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 08d2df4153 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
92ecb9c9e6
avcodec/utils: treat PAL8 for jpegs similar to other colorspaces
...
Fixes: out of array access
Fixes: 33713/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5778775641030656
Fixes: 33717/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-4960397238075392
Fixes: 33718/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-5314270096130048.fuzz
Fixes: 33719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5352721864589312
Fixes: 33721/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5938892055379968
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 f0ce023ddb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
0d5e8b2746
avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent
...
Fixes: tickets/3933/128.jls
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 011006874c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
fdfacc449b
avformat/asfdec_o: Use ff_get_extradata()
...
Fixes: OOM
Fixes: 27240/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5937469859823616
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 098314e1e5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
97c9eaaf04
avformat/id3v2: Check end for overflow in id3v2_parse()
...
Fixes: signed integer overflow: 9223372036840103978 + 67637280 cannot be represented in type 'long'
Fixes: 33341/clusterfuzz-testcase-minimized-ffmpeg_dem_DSF_fuzzer-6408154041679872
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 efdb564504 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
7d64c2256e
avformat/wtvdec: Improve size overflow checks in parse_chunks()
...
Fixes: signed integer overflow: 32 + 2147483647 cannot be represented in type 'int
Fixes: 32967/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5132856218222592
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 f8ec1da8ac )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
33dc68cad1
avcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line()
...
Fixes: Timeout
Fixes: 32886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4779761466474496
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 7b3881f0da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
5ca2f59b89
avcodec/utils: Check ima wav duration for overflow
...
Fixes: signed integer overflow: 44331634 * 65 cannot be represented in type 'int'
Fixes: 32120/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-5760221223583744
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 f40e9b1355 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-06 13:54:16 +02:00
Michael Niedermayer
8620139042
avformat/cafdec: Check channels
...
Fixes: signed integer overflow: -1184429040541376544 * 32 cannot be represented in type 'long'
Fixes: 31788/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6236746338664448
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 641c1db22b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
98843a29eb
avcodec/dpx: Check bits_per_color earlier
...
Fixes: shift exponent 251 is too large for 32-bit type 'int'
Fixes: 32147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DPX_fuzzer-5519111675314176
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 c093eb3031 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d1ec3974a4
avcodec/pnm_parser: Check image size addition for overflow
...
Fixes: assertion failure
Fixes: out of array access
Fixes: 32664/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-6533642202513408.fuzz
Fixes: 32669/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-6001928875147264
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 79ac8d5546 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
746fda9419
avcodec/h265_metadata_bsf: Check nb_units before accessing the first in h265_metadata_update_fragment()
...
Fixes: null pointer dereference
Fixes: 32113/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-4803262287052800
Same as 0c48c332ee
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 497ea04dbd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ddcaa14abb
avformat/rmdec: use larger intermediate type for audio_framesize * sub_packet_h check
...
Fixes: signed integer overflow: 65535 * 65535 cannot be represented in type 'int'
Fixes: 31406/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5024692843970560
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 cf2fd9204b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7cafb6461d
avcodec/h264_slice: Check input SPS in ff_h264_update_thread_context()
...
Fixes: crash
Fixes: check_pkt.mp4
Found-by: Rafael Dutra <rafael.dutra@cispa.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit ceae92cb29 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
94c0877dd0
avcodec/mpegvideo: Update chroma_?_shift in ff_mpv_common_frame_size_change()
...
Fixes: out of array access
Fixes: 31201/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4627865612189696.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 87d87e6587 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d24c7e4c8b
avformat/mov: Ignore multiple STSC / STCO
...
Fixes: STSC / STCO inconsistency and assertion failure
Fixes: crbug1184666.mp4
Found-by: Chromium ASAN fuzzer
Reviewed-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2611d20d35 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
fbb6d182d0
avformat/utils: Extend overflow check in dts wrap in compute_pkt_fields()
...
Fixes: signed integer overflow: -9223372032574480351 - 4294967296 cannot be represented in type 'long long'
Fixes: 30022/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5568610275819520
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 b37ff29e0e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
41903a9dd2
avfilter/vf_scale: Fix adding 0 to NULL (which is UB) in scale_slice()
...
Found-by: Jeremy Leconte <jleconte@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 1cf96ce269 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
73947ed459
avutil/common: Add FF_PTR_ADD()
...
Suggested-by: Andreas Rheinhardt
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 522a5259e9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
79a910c805
avformat/wtvdec: Check size in SBE2_STREAM_DESC_EVENT / stream2_guid
...
Fixes: signed integer overflow: 539033600 - -1910497124 cannot be represented in type 'int'
Fixes: 30928/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5922630966312960
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 1f74661543 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
25a4ecd49b
avformat/cafdec: Do not build an index if all packets are the same
...
Fixes: Timeout
Fixes: 28214/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6495999421579264
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 ea12590c8e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
eef4190e89
avformat/vividas: Use equals check with n in read_sb_block()
...
Fixes: OOM
Fixes: 27780/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5097985075314688
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 e44214a824 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6dbd46339f
avcodec/sonic: Use unsigned temporary in predictor_calc_error()
...
Fixes: signed integer overflow: -2147471366 - 18638 cannot be represented in type 'int'
Fixes: 30157/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5171199746506752
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 075d793ba8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
aa3cdf2a56
avformat/jacosubdec: Use 64bit intermediate for start/end timestamp shift
...
Fixes: signed integer overflow: -1957694447 + -1620425806 cannot be represented in type 'int'
Fixes: 30207/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5050791771635712
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 2c477be08a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
347053103f
avformat/flvdec: Check array entry number
...
Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 30209/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-5724831658147840
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 b5d8fe1c87 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
44318df915
avcodec/h264_slice: Check sps in h264_slice_header_init()
...
Fixes: null pointer dereference
Fixes: h264_slice_header_init.mp4
Found-by: Rafael Dutra <rafael.dutra@cispa.de >
Tested-by: Rafael Dutra <rafael.dutra@cispa.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8047243899 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
3d57bede38
avformat/movenc: Avoid loosing cluster array on failure
...
Fixes: crash
Fixes: check_pkt.mp4
Found-by: Rafael Dutra <rafael.dutra@cispa.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5c2ff44f91 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
97bb7b8ac7
avformat/avidec: Check for dv streams before using priv_data in parse ##dc/##wb
...
Fixes: null pointer dereference
Fixes: 31588/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6165716135968768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f733688d30 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
44c75695b1
avformat/mov: Check sample size for overflow in mov_parse_stsd_audio()
...
Fixes: signed integer overflow: 2 * 1914708000 cannot be represented in type 'int'
Fixes: 31639/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6303428239294464
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 d35677736a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
188f48b6d4
avcodec/ffwavesynth: Avoid signed integer overflow in phi_at()
...
Fixes: signed integer overflow: 2314885530818453536 - -9070214327174160352 cannot be represented in type 'long'
Fixes: 31000/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-6558389742206976
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 be08b84f8b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7ef5814e0f
avcodec/mpeg4videoenc: Check extradata malloc()
...
Fixes: Null pointer dereference
Fixes: any mpeg4 testcase which fails the malloc at that exact spot
Found-by: Rafael Dutra <rafael.dutra@cispa.de >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 33a1687bf6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d694a9426d
avcodec/speedhq: Width < 8 is not supported
...
Fixes: out of array access
Fixes: 31733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuzzer-4704307963363328
Fixes: 31736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEDHQ_fuzzer-6190960292790272
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 462b8261aa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ae300bcf66
avformat/matroskadec: Check for EOF in resync loop
...
Fixes: Timeout (too long -> instantly)
Fixes: 29136/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4586141227548672
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 5282147d0c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bb8db0639e
avcodec/utils: Use more bits for intermediate for AV_CODEC_ID_ADPCM_MS
...
Fixes: signed integer overflow: 1172577312 * 2 cannot be represented in type 'int'
Fixes: 29924/clusterfuzz-testcase-minimized-ffmpeg_dem_BOA_fuzzer-4882912874594304
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 0f441b9063 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8c683b707e
avcodec/jpegls: Check A[Q] for overflow in ff_jpegls_update_state_regular()
...
Fixes: Timeout
Fixes: 30912/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5556235476795392
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 8a3fea802a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
455e4ca588
avformat/voc_packet: prevent remaining size from becoming negative in ff_voc_get_packet()
...
Fixes: memleak
Fixes: 30909/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4886284057313280
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 337984c133 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c4708620f8
avutil/timecode: Avoid fps overflow
...
Fixes: Integer overflow and division by 0
Fixes: poc-202102-div.mov
Found-by: 1vanChen of NSFOCUS Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c94875471e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
2f3efc996a
avformat/mvi: Check audio size for more overflows
...
Fixes: left shift of negative value -352256000
Fixes: 30837/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5755626262888448
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 403b35e16e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bd4060a718
avcodec/flacdec: Avoid undefined shift in error case
...
Fixes: flac_1040988
Reported-by: Thomas Guilbert <tguilbert@google.com >
Reviewed-by: Thomas Guilbert <tguilbert@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bd525e2876 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
467a2c95a9
avcodec/ffv1dec: Check if trailer is available
...
Fixes: out of array read
Fixes: 29750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4808377272238080.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 36ad2f41e3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c467086184
avcodec/4xm: Check pre_gb in decode_i_block()
...
Fixes: Timeout
Fixes: 31257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5150866229297152
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 b87781649e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a015ca9606
avcodec/dcadsp: Fix integer overflow in dmix_add_c()
...
Fixes: signed integer overflow: 1515225320 + 759416059 cannot be represented in type 'int'
Fixes: 29256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DCA_fuzzer-5719088561258496
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 b4ebf483bc )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6d20ed96c7
avformat/flvdec: Check double before cast in parse_keyframes_index()
...
Fixes: -2.21166e+304 is outside the range of representable values of type 'long'
Fixes: 29169/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5725452796821504
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 09e5e406c7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e8f9a3690d
avformat/paf: Check for EOF before allocation in read_header()
...
Fixes: OOM
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 bcb1e9d3b9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
00c664f10e
avcodec/aacdec_template: Avoid undefined negation in imdct_and_windowing_eld()
...
Fixes: negation of -2147483648 cannot be represented in type 'INTFLOAT' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 29057/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5642758933053440
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 633924539a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
174093afd1
avformat/lxfdec: Fix multiple integer overflows related to track_size
...
Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_LXF_fuzzer-6634030636335104
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 7819412f44 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
97c89068e9
avcodec/exr: skip bottom clearing loop when its outside the image
...
Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int'
Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
908e836bca
avutil/parseutils: Check sign in av_parse_time()
...
Fixes: signed integer overflow: -9223372053736 * 1000000 cannot be represented in type 'long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-6607924558430208
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 5d7f17e885 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
118c895270
avformat/aiffdec: Check that SSND is at least 8 bytes
...
Fixes: Infinite loop
Fixes: 30874/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5933710488764416
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 460d3dc41f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a2e344eac4
avformat/dcstr: Check sample rate
...
Fixes: signed integer overflow: -1300248894420254720 * 16 cannot be represented in type 'long'
Fixes: 30879/clusterfuzz-testcase-minimized-ffmpeg_dem_DCSTR_fuzzer-5094464215449600
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 fdcb966f4a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
db0a8edfe8
avcodec/alsdec: Check bitstream input in read_block()
...
Fixes: Timeout
Fixes: 28110/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5036338973507584
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 53d739db4e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6b0a5c6741
avformat/mov: Extend data_size check in mov_read_udta_string()
...
Fixes: signed integer overflow: -2147483634 - 16 cannot be represented in type 'int'
Fixes: 28322/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5711888402612224
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 74c4c53953 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5ccb9ccea1
avformat/aadec: Check for EOF while reading chapters
...
Fixes: timeout
Fixes: 28199/clusterfuzz-testcase-minimized-ffmpeg_dem_AA_fuzzer-4896162657861632
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 bcc7d14453 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b3a37b1abc
avformat/voc_packet: Add a basic check on max_size
...
Fixes: signed integer overflow: -2147483648 - 4 cannot be represented in type 'int'
Fixes: 28127/clusterfuzz-testcase-minimized-ffmpeg_dem_VOC_fuzzer-4880586455646208
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 52f75181bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5323cef5d0
avformat/microdvddec: use 64bit for durations
...
Fixes: signed integer overflow: 7 - -2147483647 cannot be represented in type 'int'
Fixes: 28036/clusterfuzz-testcase-minimized-ffmpeg_dem_MICRODVD_fuzzer-5171698751766528
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 f569ac4ce0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c641b7dd4b
avcodec/hapdec: Change compressed_offset to unsigned 32bit
...
Fixes: out of array access
Fixes: 29345/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5401813482340352
Fixes: 30745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5762798221131776
Suggested-by: Anton
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 89fe1935b1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
3a8911ec09
avformat/rmdec: Check codec_length without overflow
...
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 30333/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5175286983426048
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 d558c9f237 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
4df5e76723
avformat/mov: Check element count in mov_metadata_hmmt()
...
Fixes: Timeout
Fixes: 30325/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6048395703746560
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 1d277b92fa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a9c3bade3b
avcodec/vp8: Move end check into MB loop in vp78_decode_mv_mb_modes()
...
Fixes: Timeout (long -> 5sec)
Fixes: 30269/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5430325004075008
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 6a797ceafe )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5acfef0727
avcodec/fits: Check gcount and pcount being non negative
...
Fixes: signed integer overflow: 9223372036854775807 - -30069403896 cannot be represented in type 'long'
Fixes: 30046/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5807144773484544
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 c000a91288 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
4b8666d20f
avformat/nutdec: Check timebase count against main header length
...
Fixes: Timeout (long -> 3ms)
Fixes: 28514/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6078669009321984
Fixes: 30095/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-5074433016463360
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 c425198558 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
70855e0e61
avformat/electronicarts: Clear partial_packet on error
...
Fixes: Infinite loop
Fixes: 30165/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-6224642371092480
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 59bb9dc2a6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8e8bf8ca8f
avformat/r3d: Check samples before computing duration
...
Fixes: signed integer overflow: -4611686024827895807 + -4611686016279904256 cannot be represented in type 'long'
Fixes: 30161/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5694406713802752
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 7a2aa5dc2a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a2dbe8005d
avcodec/pnm_parser: Check av_image_get_buffer_size() for failure
...
Fixes: out of array access
Fixes: 30135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4997145650397184
Fixes: 30208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5605891665690624.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 5314a4996c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7628ea6d01
avformat/wavdec: Consider AV_INPUT_BUFFER_PADDING_SIZE in set_spdif()
...
The buffer is read by using the bit reader
Fixes: out of array read
Fixes: 27539/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5650565572591616
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 0a7c648e2d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e5a1d0febe
avformat/rmdec: Check remaining space in debug av_log() loop
...
Fixes: Timeout (long -> 2 ms)
Fixes: 26709/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5665833403285504
Fixes: 27522/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6321071221112832
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 a8fe78decd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7cf8366fe5
avformat/flvdec: Treat high ts byte as unsigned
...
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 27516/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5152854660349952
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f514113cfa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
fcbcc75059
avformat/samidec: Sanity check pts
...
Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 29743/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-5499256859394048
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 2014b01352 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a5f24927a7
avcodec/jpeg2000dec: Check atom_size in jp2_find_codestream()
...
Fixes: Infinite loop
Fixes: 29722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6412228041506816
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 2a2082a41b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bcdcc17015
avformat/avidec: Use 64bit in get_duration()
...
Fixes: signed integer overflow: 2147483424 + 8224 cannot be represented in type 'int'
Fixes: 29619/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5191424373030912
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 a0ceb0cdd4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5dafc1edca
avformat/mov: Check for duplicate st3d
...
Fixes: memleak
Fixes: 29585/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6594188688490496
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 658f0606cb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
2b79229316
avformat/mvdec: Check for EOF in read_index()
...
Fixes: Timeout
Fixes: 29550/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5094307193290752
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 6c64351bb1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b290a54e5f
avcodec/jpeglsdec: Fix k=16 in ls_get_code_regular()
...
Fixes: Timeout
Fixes: left shift of 33046 by 16 places cannot be represented in type 'int'
Fixes: 29258/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-4889231489105920
Fixes: 29515/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-6161940391002112
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 980900d991 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ac7566e2d8
avformat/id3v2: Check the return from avio_get_str()
...
Fixes: out of array access
Fixes: 29446/clusterfuzz-testcase-minimized-ffmpeg_dem_AAC_fuzzer-5096222622875648
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 25f240fcb3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ae3364bc30
avcodec/hevc_sei: Check payload size in decode_nal_sei_message()
...
Fixes: out of array access
Fixes: 29392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4821602850177024.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 0791a515d3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b2a43371b8
libavutil/eval: Remove CONFIG_TRAPV special handling
...
Fixes: division by zero
Fixes: 29555/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-5149951447400448
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 8574fcbfc7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8d66c20378
avformat/wtvdec: Check len in parse_chunks() to avoid overflow
...
Fixes: signed integer overflow: 2147483647 + 7 cannot be represented in type 'int'
Fixes: 30084/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6192261941559296
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 5552ceaf56 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5e0ef4e2a9
avformat/asfdec_f: Add an additional check for the extradata size
...
Fixes: OOM
Fixes: 30066/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6182309126602752
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 2c8cd4490a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c8707132a9
avformat/3dostr: Check sample_rate
...
Fixes: signed integer overflow: -1268324762623155200 * 8 cannot be represented in type 'long'
Fixes: 30123/clusterfuzz-testcase-minimized-ffmpeg_dem_THREEDOSTR_fuzzer-6710765123928064
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 7e5034f97e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b31b549e76
avformat/4xm: Make audio_frame_count 64bit
...
Fixes: signed integer overflow: 2099257366 * 2 cannot be represented in type 'int'
Fixes: 27486/clusterfuzz-testcase-minimized-ffmpeg_dem_FOURXM_fuzzer-5112179134824448
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 842c268c64 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bba37dfe0f
avformat/mov: Use av_mul_q() to avoid integer overflows
...
Fixes: signed integer overflow: 538976288 * 538976288 cannot be represented in type 'int'
Fixes: 27473/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5758978289827840
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 4f70e1ec0c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
45995534b2
avcodec/vp9dsp_template: Fix integer overflows in itxfm_wrapper
...
Fixes: signed integer overflow: 2147483641 + 32 cannot be represented in type 'int'
Fixes: 27452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5078752576667648
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 4dfb7ff528 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8493ee2af5
avformat/rmdec: Reorder operations to avoid overflow
...
Fixes: signed integer overflow: -2147483648 - 14 cannot be represented in type 'int'
Fixes: 27659/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5697250168406016
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 b12e713b80 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
95da75eb99
avcodec/mxpegdec: fix SOF counting
...
Fixes: Timeout (>10sec -> 15ms)
Fixes: 27652/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5125920868007936
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 401495def6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
044af7cb4b
avcodec/rscc: Check inflated_buf size whan it is used
...
Fixes: out of array access
Fixes: 27434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5196757675540480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit a5ed6da9bd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ad9e2f8914
avformat/mvdec: Sanity check SAMPLE_WIDTH
...
Fixes: signed integer overflow: 999999999 * 8 cannot be represented in type 'int'
Fixes: 30048/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5864289917337600
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 ab82c10578 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
3f6044ae55
avformat/rmdec: Fix codecdata_length overflow check
...
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 28509/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6310969680723968
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 3c41d0bfd6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6bc7e2bd6e
avcodec/simple_idct: Fix undefined integer overflow in idct4row()
...
Fixes: signed integer overflow: -1498310196 - 902891776 cannot be represented in type 'int'
Fixes: 28445/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5075163389493248
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 57f7e5caa3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d4c2967a35
avformat/tta: Use 64bit intermediate for index
...
Fixes: signed integer overflow: 42032 * 51092 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6679539648430080
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 fd61b42b4c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
da9a2397e6
avformat/soxdec: Check channels to be positive
...
Fixes: signed integer overflow: 32 * -1795162112 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SOX_fuzzer-6724151473340416
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 b0588b73da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ef89d01449
avcodec/cscd: Check output len in zlib as in lzo
...
Fixes: Timeout (>10sec -> 134ms)
Fixes: 27245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-575318210772992
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 6de039823c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e4bfc5e421
avcodec/vp3: Check input amount in theora_decode_header()
...
Fixes: Timeout
Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296
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 869fe41d10 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a8efc94b39
avformat/wavdec: Check avio_get_str16le() for failure
...
Fixes: out of array access
Fixes: 29195/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5037853281222656
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 d7594ee751 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
f594353f26
avformat/flvdec: Check for EOF in amf_skip_tag()
...
Fixes: Timeout
Fixes: 29070/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5650106766458880
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 9725d07a17 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
502ca11d69
avformat/aiffdec: Check size before subtraction in get_aiff_header()
...
Fixes: Infinite loop
Fixes: 27235/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5761398380167168
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 8af299acde )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6ed98dfd14
avformat/electronicarts: More chunk_size checks
...
Fixes: Timeout
Fixes: 26909/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-6489496553783296
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 d03f0ec9a1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
381f3d9fac
avcodec/cfhd: check peak.offset
...
Fixes: signed integer overflow: -2147483648 - 4 cannot be represented in type 'int'
Fixes: 26907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5746202330267648
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 386faeda5f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a6c91db54c
avformat/tedcaptionsdec: Check for overflow in parse_int()
...
Fixes: signed integer overflow: 1111111111111111111 * 10 cannot be represented in type 'long'
Fixes: 26892/clusterfuzz-testcase-minimized-ffmpeg_dem_TEDCAPTIONS_fuzzer-5756045055754240
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 b0f8586ca9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7faebb4e0a
avformat/nuv: Check channels
...
Fixes: signed integer overflow: -3468545475927866368 * 4 cannot be represented in type 'long'
Fixes: 28879/clusterfuzz-testcase-minimized-ffmpeg_dem_NUV_fuzzer-6303367307591680
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 fc45d924d7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
846e09c8b3
avformat/mpc8: Check size before implicitly converting to int
...
Fixes: Timeout
Fixes: 28551/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-6229183210586112
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 78d6d8ddb5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e5dbd96637
avformat/nutdec: Fix integer overflow in count computation
...
Note, the value is checked a few lines later already
Fixes: signed integer overflow: -440402016 - 1879048064 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6603876618469376
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 0014249fd9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
9cc75e54a8
avformat/mvi: Use 64bit for testing dimensions
...
Fixes: signed integer overflow: 65535 * 65535 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-6649291124899840
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 48fb752767 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
428ff6d209
avformat/utils: Check dts in update_initial_timestamps() more
...
Fixes: signed integer overflow: -9223372036853488158 - 90000000 cannot be represented in type 'long long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_MPSUB_fuzzer-6696625298866176
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 29851cb840 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
32ad867b24
avformat/flvdec: Check for avio_read() failure in amf_get_string()
...
Suggested-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cb31667611 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ee92e68f6c
avformat/flvdec: Check for nesting depth in amf_skip_tag()
...
Fixes: out of array access
Fixes: 29440/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5985279812960256.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 2ef522c918 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
3db1c93b5c
avformat/flvdec: Check for nesting depth in amf_parse_object()
...
Fixes: out of array access
Fixes: 29202/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5112845840809984
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 074e204b42 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6cd5bfe3cd
avformat/asfdec_o: Check for EOF in asf_read_marker()
...
Fixes: Timeout
Fixes: 26460/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5710884393189376
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 9e3d09f435 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a5d1613f48
avformat/utils: Check dts - (1<<pts_wrap_bits) overflow
...
Fixes: signed integer overflow: -9223372036842389247 - 2147483648 cannot be represented in type 'long long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-4845007531671552
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 d82ee907d6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
657efee3d4
avformat/bfi: Check chunk_header
...
Fixes: signed integer overflow: -2147483648 - 3 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6665764123836416
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 638a151a87 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d5b6c4dd0e
avformat/ads: Check size
...
Fixes: signed integer overflow: -2147483616 - 64 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_ADS_fuzzer-6617769344892928
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 c78b2b138c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
aa63110c1d
avformat/iff: Check block align also for ID_MAUD
...
Fixes: Timeout & OOM
Fixes: 28701/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5185094964871168
Fixes: 29116/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4874284795297792
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 b17ffe8f8f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7fcac5c8c3
avcodec/utils: Check for integer overflow in get_audio_frame_duration() for ADPCM_DTK
...
Fixes: signed integer overflow: 131203586 * 28 cannot be represented in type 'int'
Fixes: 26817/clusterfuzz-testcase-minimized-ffmpeg_dem_MSF_fuzzer-6296902548848640
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 2488ba85a0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d960a7a5d8
avformat/fitsdec: Better size checks
...
Fixes: out of array access
Fixes: 26819/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5634559355650048
Fixes: 26820/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5760774955597824
Fixes: 27379/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5129775942991872.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 14bbb6bb30 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
34e30575ae
avformat/mxfdec: Fix integer overflow in next position in mxf_read_local_tags()
...
Fixes: signed integer overflow: 9223372036854775723 + 8192 cannot be represented in type 'long'
Fixes: 29072/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4812604904177664
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 d3d9b1fc8e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5367c59d68
avformat/avidec: dv does not support palettes
...
Fixes: memleak
Fixes: 26937/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5763003338981376
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 1b373b41d9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
424f434c56
libavformat/utils: consider avio_size() failure in ffio_limit()
...
Fixes: Timeout (>20sec -> 3ms)
Fixes: 26918/clusterfuzz-testcase-minimized-ffmpeg_dem_THP_fuzzer-5750425191710720
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 1b1dac2716 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
ca82f2f1e2
avformat/nistspheredec: Check bits_per_coded_sample and channels
...
Fixes: signed integer overflow: 80 * 92233009 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_NISTSPHERE_fuzzer-6669100654919680
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 60770a50fb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
891209076d
avformat/asfdec_o: Check size vs. offset in detect_unknown_subobject()
...
Fixes: signed integer overflow: 2314885530818453566 + 7503032301549264928 cannot be represented in type 'long'
Fixes: 26639/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-6024222100684800
Alternatively this could be ignored but then the end condition of the loop
would be hard to reach as avio_tell() is int64_t
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 0bee216ad4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
2382d58689
avformat/utils: check for integer overflow in av_get_frame_filename2()
...
Fixes: signed integer overflow: 317316873 * 10 cannot be represented in type 'int'
Fixes: 24708/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5731180885049344
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 03c479ce23 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
4e73410837
avutil/timecode: Avoid undefined behavior with large framenum
...
Fixes: signed integer overflow: 2147462079 + 2149596 cannot be represented in type 'int'
Fixes: 27565/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5091972813160448
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 1b19057396 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bd899b2cee
avformat/mov: Check a.size before computing next_root_atom
...
Fixes: signed integer overflow: 64 + 9223372036854775799 cannot be represented in type 'long'
Fixes: 27563/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6244650163372032
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 8c9a5a0fe9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
1adc349011
avformat/sbgdec: Reduce the amount of floating point in str_to_time()
...
Fixes: 1e+75 is outside the range of representable values of type 'long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6626834808700928
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 ac6c8993f7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
a0984a153e
avformat/mxfdec: Free all types for both Descriptors
...
Fixes: memleak
Fixes: 26352/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5201158714687488
Suggested-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 >
(cherry picked from commit 88519be8db )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d5aa69dbed
uavformat/rsd: check for EOF in extradata
...
Fixes: OOM
Fixes: 26503/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6530816735444992
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 7186ec88b9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
24ca658ea6
avcodec/wmaprodec: Check packet size
...
Fixes: left shift of negative value -25824
Fixes: 27754/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5760255962906624
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 69aeba8a19 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6b0eacc1c2
avcodec/rasc: Check frame before clearing
...
Fixes: null pointer dereference
Fixes: 27737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5769028685266944
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 380a3a0adf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7ce729649f
avformat/vividas: Check number of audio channels
...
Fixes: division by 0
Fixes: 28597/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5752201490333696
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 66deab3a26 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
273f53e57d
avcodec/alsdec: Fix integer overflow with quant_cof
...
Fixes: signed integer overflow: -210824 * 16384 cannot be represented in type 'int'
Fixes: 28670/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5682310846480384
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 7ce40dde03 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
53da736645
avformat/mpegts: Fix argument type for av_log
...
Reviewed-by: Marton Balint <cus@passwd.hu >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 654b21ef17 )
2021-09-10 16:04:26 +02:00
Michael Niedermayer
2b3c1a3000
avformat/cafdec: clip sample rate
...
Fixes: 1.21126e+111 is outside the range of representable values of type 'int'
Fixes: 27398/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5412960339755008
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 684aec6a68 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
dcb07bee75
avcodec/ffv1dec: Fix off by 1 error with quant tables
...
Fixes: assertion failure
Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144
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 5cae71d2b7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
92c1ee9486
avformat/mpegts: Increase pcr_incr width to 64bit
...
Fixes: division by zero
Fixes: 26459/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5666350112178176
Fixes: 28154/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5195728439476224
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 ef7b117b7b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d84bc6850e
avcodec/utils: Check bitrate for overflow in get_bit_rate()
...
Fixes: signed integer overflow: 617890810133996544 * 16 cannot be represented in type 'long'
Fixes: 26565/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5092054700654592
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 8aadae670f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
eb43e14f8c
avformat/mov: Check if hoov is at the end
...
Fixes: Timeout, probably infinite loop
Fixes: 26559/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5391165484171264
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 0afbaabdca )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
781f4fc448
avcodec/hevc_ps: check scaling_list_dc_coef
...
Fixes: signed integer overflow: 2147483640 + 8 cannot be represented in type 'int'
Fixes: 28449/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5686013259284480
Reviewed-by: James Almer <jamrial@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 f1700bd8bb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
40932b723f
avformat/iff: Check data_size
...
Fixes: infinite loop
Fixes: 27834/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5694930919620608
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 001bc594d8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
35076c8f63
avformat/matroskadec: Sanity check codec_id/track type
...
Fixes: memleak
Fixes: 27766/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-5198300814508032
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 7b88dd8f0c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
9ea488e0fb
avformat/rpl: Check the number of streams
...
Fixes: out of memory access
Fixes: 27787/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-4743666463408128.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 0677bdb1f5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
95882fe008
avformat/vividas: Check sample_rate
...
Fixes: Assertion c > 0 failed at libavutil/mathematics.c
Fixes: 27001/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5726041328582656
Fixes: 27453/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5716060384526336
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 b1bced5433 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e1bea3ad03
avformat/vividas: Make len signed
...
Fixes: out of array access
Fixes: 27424/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5682070692823040
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 b29d351f97 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
2d73ff7004
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-09-10 16:04:26 +02:00
Michael Niedermayer
a643e2e9c1
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-09-10 16:04:26 +02:00
Michael Niedermayer
fe64c72c5a
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-09-10 16:04:26 +02:00
Michael Niedermayer
ca040d6b65
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-09-10 16:04:26 +02:00
Michael Niedermayer
2f16247c99
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-09-10 16:04:26 +02:00
Michael Niedermayer
6718c814aa
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-09-10 16:04:26 +02:00
Michael Niedermayer
071ae40ee3
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-09-10 16:04:26 +02:00
Michael Niedermayer
f1018f874c
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-09-10 16:04:26 +02:00
Michael Niedermayer
68dd210aab
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-09-10 16:04:26 +02:00
Michael Niedermayer
f226e4b469
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-09-10 16:04:26 +02:00
Michael Niedermayer
8d3dd028a5
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-09-10 16:04:26 +02:00
Michael Niedermayer
4810fe7936
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-09-10 16:04:26 +02:00
Michael Niedermayer
9be82d9ab0
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-09-10 16:04:26 +02:00
Michael Niedermayer
a1206b3fc6
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-09-10 16:04:26 +02:00
Michael Niedermayer
d3606caee9
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-09-10 16:04:26 +02:00
Michael Niedermayer
2521c55a54
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-09-10 16:04:26 +02:00
Michael Niedermayer
df388f600d
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-09-10 16:04:26 +02:00
Michael Niedermayer
89db9bbfc3
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-09-10 16:04:26 +02:00
Michael Niedermayer
636fe41451
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-09-10 16:04:26 +02:00
Michael Niedermayer
a21ad9701f
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-09-10 16:04:26 +02:00
Michael Niedermayer
316c6d1645
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-09-10 16:04:26 +02:00
Michael Niedermayer
cdf76ca572
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-09-10 16:04:26 +02:00
Michael Niedermayer
63e0cb0b68
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-09-10 16:04:26 +02:00
Michael Niedermayer
bce5806f42
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-09-10 16:04:26 +02:00
Michael Niedermayer
a56fdfc01f
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-09-10 16:04:26 +02:00
Michael Niedermayer
143037c580
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-09-10 16:04:26 +02:00
Michael Niedermayer
955b471fbe
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-09-10 16:04:26 +02:00
Michael Niedermayer
f201ec88d0
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-09-10 16:04:26 +02:00
Michael Niedermayer
5d804bfba3
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-09-10 16:04:26 +02:00
Michael Niedermayer
c1574b35c3
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-09-10 16:04:26 +02:00
Michael Niedermayer
fa31c57838
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-09-10 16:04:26 +02:00
Michael Niedermayer
59305f5dfe
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-09-10 16:04:26 +02:00
Michael Niedermayer
ab8e3d3d46
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-09-10 16:04:26 +02:00
Michael Niedermayer
9029882be6
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-09-10 16:04:26 +02:00
Michael Niedermayer
2765860a65
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-09-10 16:04:26 +02:00
Michael Niedermayer
804fcfb05e
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-09-10 16:04:26 +02:00
Michael Niedermayer
49c220f93b
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-09-10 16:04:26 +02:00
Michael Niedermayer
ca6118797e
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-09-10 16:04:26 +02:00
Michael Niedermayer
6e0988527f
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-09-10 16:04:26 +02:00
Michael Niedermayer
607a34f726
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-09-10 16:04:26 +02:00
Michael Niedermayer
2325490a2f
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-09-10 16:04:26 +02:00
Michael Niedermayer
cb054a2daa
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-09-10 16:04:26 +02:00
Michael Niedermayer
e583c69816
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-09-10 16:04:26 +02:00
Michael Niedermayer
4d5d82314f
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-09-10 16:04:26 +02:00
Michael Niedermayer
d3595579ca
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-09-10 16:04:26 +02:00
Michael Niedermayer
17e941dbd4
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-09-10 16:04:26 +02:00
Michael Niedermayer
b8ba08ef17
avformat/jacosubdec: Use 64bit inside get_shift()
...
Fixes: signed integer overflow: 111111111 * 30 cannot be represented in type 'int'
Fixes: 26448/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5638440374501376
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 715ff75e5d )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
92938c2f30
avformat/genh: Check block_align
...
Fixes: infinite loop
Fixes: 26440/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5632134020333568
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 37396e9ba8 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
50faadb711
avformat/mvi: Check count for overflow
...
Fixes: left shift of 21378748 by 10 places cannot be represented in type 'int'
Fixes: 26449/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5680463374712832
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 a413ed9863 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b98d0d4d33
avcodec/magicyuv: Check slice size before reading flags and pred
...
Fixes: heap-buffer-overflow
Fixes: 26487/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5742553675333632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0dc42147b6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
bd58373224
avformat/asfdec_f: Check for negative ext_len
...
Fixes: Infinite loop
Fixes: 26376/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_U32LE_fuzzer-6050518830678016
Fixes: 26377/clusterfuzz-testcase-minimized-ffmpeg_dem_TY_fuzzer-4838195726123008
Fixes: 26384/clusterfuzz-testcase-minimized-ffmpeg_dem_G729_fuzzer-5173450337157120
Fixes: 26396/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_S24BE_fuzzer-5071092206796800
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 209b9ff5c3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
476c7d446b
avformat/bethsoftvid: Check image dimensions before use
...
Fixes: signed integer overflow: 55255 * 53207 cannot be represented in type 'int'
Fixes: 26387/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS2_fuzzer-5684222226071552
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 50b29f081e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
22f451a0a3
avformat/genh: Check block_align for how it will be used in SDX2_DPCM
...
Fixes: signed integer overflow: 19922944 * 1024 cannot be represented in type 'int'
Fixes: 26402/clusterfuzz-testcase-minimized-ffmpeg_dem_VMD_fuzzer-5745470053548032
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 c95b47e18f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
92d7a08c61
avformat/au: Check for EOF in au_read_annotation()
...
Fixes: Timeout (too looong -> 1 ms)
Fixes: 26366/clusterfuzz-testcase-minimized-ffmpeg_dem_SDX_fuzzer-5655584843759616
Fixes: 26391/clusterfuzz-testcase-minimized-ffmpeg_dem_ALP_fuzzer-5484026133217280
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 e680d50eb4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
934b7ed517
avformat/vividas: Check for zero v_size
...
Fixes: SEGV on unknown address 0x000000000000
Fixes: 26482/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-4905102324006912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c7a5face77 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
3783ffa2a0
avformat/segafilm: Do not assume AV_CODEC_ID_NONE is 0
...
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit d34e4904cd )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
1b1ab7013e
avformat/segafilm: Check that there is a stream
...
Fixes: assertion failure
Fixes: 26472/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-5759751591559168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c0d7fd269b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e653c2fec4
avformat/wtvdec: Check dir_length
...
Fixes: Infinite loop
Fixes: 26445/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5125558331244544
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 1868cb7316 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
30aea1efec
avformat/ffmetadec: finalize AVBPrint on errors
...
Fixes: memleak
Fixes: 26450/clusterfuzz-testcase-minimized-ffmpeg_dem_FFMETADATA_fuzzer-6249850443923456
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a927128617 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c863e7e600
avcodec/decode/ff_get_buffer: Check for overflow in FFALIGN()
...
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 26218/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5734075396259840
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 939b72b02e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
d09c9a7162
avcodec/exr: Check limits to avoid overflow in delta computation
...
Fixes: signed integer overflow: 553590816 - -2145378049 cannot be represented in type 'int'
Fixes: 26315/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5938755121446912
Fixes: 26340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5644316208529408
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 6910e0f4e5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c8b11c0d3f
avformat/boadec: Check that channels and block_align are set
...
Fixes: Infinite loop
Fixes: 26381/clusterfuzz-testcase-minimized-ffmpeg_dem_BOA_fuzzer-5745789089087488
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 44ff5a1bff )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5dbeb9c4d6
avformat/asfdec_f: Check name_len for overflow
...
Fixes: signed integer overflow: -1172299744 * 2 cannot be represented in type 'int'
Fixes: 26258/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5672758488596480
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 0d088a47ca )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
f62da97dfc
avcodec/h264idct_template: Fix integer overflow in ff_h264_chroma422_dc_dequant_idct()
...
Fixes: signed integer overflow: 241173056 + 1953511200 cannot be represented in type 'int'
Fixes: 26086/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5068366420901888
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 d198362839 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
f419c855b1
avcodec/aacdec_fixed: Limit index in vector_pow43()
...
Fixes: out of array access
Fixes: 26087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5724825462767616
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 4f83a53638 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8f17815edb
avformat/rmdec: sanity check coded_framesize
...
Fixes: signed integer overflow: -14671840 * 8224 cannot be represented in type 'int'
Fixes: 24793/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5101884323659776
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 aee8477c6b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6075d36825
avformat/flvdec: Check for EOF in amf_parse_object()
...
Fixes: Timeout (too long -> 1ms)
Fixes: 26108/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5653887668977664
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 33624f4f2e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
182a1902f7
avcodec/smacker: Check remaining bits in SMK_BLK_FULL
...
Fixes: out of array access
Fixes: 26047/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5083031667474432
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 42ded4d1e6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
b77c294c9a
avcodec/cook: Check subpacket index against max
...
Fixes: off by 1 error
Fixes: index 5 out of bounds for type 'COOKSubpacket [5]'
Fixes: 25772/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5762459498184704.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 5a2a7604da )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
317b5bdcf2
avcodec/utils: Check for overflow with ATRAC* in get_audio_frame_duration()
...
Fixes: signed integer overflow: 1024 * 13129048 cannot be represented in type 'int'
Fixes: 26378/clusterfuzz-testcase-minimized-ffmpeg_dem_CODEC2RAW_fuzzer-5634018353348608
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 01bb12f883 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
9bd5b897db
avcodec/hevcpred_template: Fix diagonal chroma availability in 4:2:2 edge case in intra_pred
...
Fixes: pixel decode issue.ts
Fixes: raw frame.hevc
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3fbf873792 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
db799e0bc2
avformat/icodec: Change order of operations to avoid NULL dereference
...
Fixes: SEGV on unknown address 0x000000000000
Fixes: 26379/clusterfuzz-testcase-minimized-ffmpeg_dem_ICO_fuzzer-5709011753893888
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3300f5c133 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
55698d3ef2
avcodec/exr: Fix overflow with many blocks
...
Fixes: signed integer overflow: 1073741827 * 8 cannot be represented in type 'int'
Fixes: 25621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6304841641754624
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 7265b7d904 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
139729ca62
avcodec/vp9dsp_template: Fix integer overflows in idct16_1d()
...
Fixes: signed integer overflow: -190760 * 11585 cannot be represented in type 'int'
Fixes: 25471/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5743354917421056
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 394e8bb385 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
51625c3a41
avcodec/ansi: Check initial dimensions
...
Fixes: Timeout (minutes to less than 1sec)
Fixes: 25682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANSI_fuzzer-6320712032452608
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 949f0a6be9 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
6730fc755b
avcodec/hevcdec: Check slice_cb_qp_offset / slice_cr_qp_offset
...
Fixes: signed integer overflow: 29 + 2147483640 cannot be represented in type 'int'
Fixes: 25413/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5697909331591168
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 106f11f68a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e5e60759bb
avcodec/sonic: Check for overread
...
Fixes: Timeout (too long -> 1.3 sec)
Fixes: 24358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5107284099989504
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 eeabdef1bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
9c13daeaf7
avformat/subviewerdec: fail on AV_NOPTS_VALUE
...
Such values are not supported by ff_subtitles_queue*
Fixes: signed integer overflow: 10 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 24193/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5714901855895552
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 b7f51428b1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
f1e4fe95bc
avcodec/exr: Check line size for overflow
...
Fixes: signed integer overflow: 570425356 * 6 cannot be represented in type 'int
Fixes: 25929/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5099197739827200
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 9b72cea446 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
20256685ac
avcodec/exr: Check xdelta, ydelta
...
Fixes: assertion failure
Fixes: 25617/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5648746061496320
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 6949df35d0 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
7ec4c95d94
avcodec/celp_filters: Avoid invalid negation in ff_celp_lp_synthesis_filter()
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 25675/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G729_fuzzer-4786580731199488
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 11a6347f9e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
c9d831808b
avcodec/takdsp: Fix negative shift in decorrelate_sf()
...
Fixes: left shift of negative value -4
Fixes: 25723/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-6250580752990208
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 4f54f53003 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
0e7b7fdbdf
avcodec/dxtory: Fix negative stride shift in dx2_decode_slice_420()
...
Fixes: left shift of negative value -640
Fixes: 26044/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5631057602543616
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 3291d994b7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
fa06111bb1
avformat/asfdec_f: Change order or operations slightly
...
Fixes: signed integer overflow: 20 * 5184056935931942919 cannot be represented in type 'long'
Fixes: 25466/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4798660247552000
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 686f015190 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5973df8f6a
avformat/dxa: Use av_rescale() for duration computation
...
Fixes: signed integer overflow: 8224000000 * 1629552639 cannot be represented in type 'long'
Fixes: 24908/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4658478506049536
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 c313089fbe )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
49eb5761b6
avcodec/vc1_block: Fix integer overflow in ac value
...
Fixes: signed integer overflow: 25488 * 87381 cannot be represented in type 'int'
Fixes: 24765/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5108259565076480
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 3056e19e68 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
5bc8eae840
avformat/iff: Check data_size not overflowing int64
...
Fixes: Infinite loop
Fixes: 25844/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5660803318153216
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 24352ca792 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
f38d86df9d
avcodec/dxtory: Fix negative shift in dx2_decode_slice_410()
...
Fixes: left shift of negative value -768
Fixes: 25574/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-6012596027916288
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 abebd87764 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
8ab1d3e7f0
avcodec/sonic: Check channels before deallocating
...
Fixes: heap-buffer-overflow
Fixes: 25744/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5172961169113088
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f249981976 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
e6be468b4a
avformat/vividas: Check for EOF in first loop in track_header()
...
Fixes: timeout (243sec -> a few ms)
Fixes: 25716/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5764093666131968
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 7170d342e5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-10 16:04:26 +02:00
Michael Niedermayer
653bd4f135
avcodec/ansi: Check nb_args for overflow
...
Fixes: Integer overflow (no testcase)
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit bc0e776c9a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-20 10:33:45 +02:00
Michael Niedermayer
a4945989fe
avformat/wc3movie: Cleanup on wc3_read_header() failure
...
Fixes: memleak
Fixes: 23660/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6007508031504384
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 b78860e769 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
2b1e1c2d03
avformat/wc3movie: Move wc3_read_close() up
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0c635f2ce6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
3bdeb977e1
avcodec/diracdsp: Fix integer anomaly in dequant_subband_*
...
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 23760/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-604209011412172
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 ca3c6c981a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
ae4393ae9e
avutil/fixed_dsp: Fix integer overflows in butterflies_fixed_c()
...
Fixes: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'
Fixes: 23646/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5480991098667008
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 4a02ae49c2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
6e1af591d5
avcodec/wmalosslessdec: Check remaining space before padding and channel residue
...
Fixes: Timeout (1101sec -> 0.4sec)
Fixes: 24491/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5725337036783616
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 c467adf3bf )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
1054819802
avformat/cdg: Fix integer overflow in duration computation
...
Fixes: signed integer overflow: 8398407 * 300 cannot be represented in type 'int'
Fixes: 23914/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4702539290509312
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 aa8935b395 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
3a876338f1
avcodec/mpc: Fix multiple numerical overflows in ff_mpc_dequantize_and_synth()
...
Fixes: -2.4187e+09 is outside the range of representable values of type 'int'
Fixes: signed integer overflow: -14512205 + -2147483648 cannot be represented in type 'int'
Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPC7_fuzzer-5747263166480384
Fixes: 23528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPC7_fuzzer-5747263166480384
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 2b9f39689a )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
8af33f41f7
avcodec/agm: Fix off by 1 error in decode_inter_plane()
...
Fixes: Regression since 1f20969457
Found-by: Paul B Mahol <onemda@gmail.com >
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6d71a25cc4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
c8fb3183a4
avformat/electronicarts: Check if there are any streams
...
Fixes: Assertion failure (invalid stream index)
Fixes: 25120/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6565251898933248
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 39a98623ed )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
5030a9cca1
avcodec/ffwavesynth: Fix integer overflow in wavesynth_synth_sample / WS_SINE
...
Fixes: signed integer overflow: -1429092 * -32596 cannot be represented in type 'int'
Fixes: 24419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5157849974702080
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 a0da95df77 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
a74d895bbd
avcodec/vp9dsp_template: Fix integer overflow in iadst8_1d()
...
Fixes: signed integer overflow: 998938090 + 1169275991 cannot be represented in type 'int'
Fixes: 23411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-4644692330545152
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 d182d8f10c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
beb4bd4e3a
avformat/avidec: Fix io_fsize overflow
...
Fixes: signed integer overflow: 7958120835074169528 * 9 cannot be represented in type 'long long'
Fixes: 23382/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6230683226996736
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 cf0c700b0c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
0ce90738fc
avcodec/cfhd: Check transform type
...
Fixes: out of array access
Fixes: 24823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4855119863349248
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 659658d08b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
71b1422ee9
avcodec/tiff: Restrict tag order based on specification
...
"The entries in an IFD must be sorted in ascending order by Tag. Note that this is
not the order in which the fields are described in this document."
This way various dimensions, sample and bit sizes cannot be changed at
arbitrary times which reduces the potential for bugs.
The tag reading code also on various places assumes that numerically previous
tags have already been parsed, so this needs to be enforced one way or another.
If this commit causes problems with real world files which are not easy to fix
then some other form of checks are needed to ensure the various dependencies
in the tag reading are not violated.
Fixes: out of array access
Fixes: 24825/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6326925027704832
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 ad29f9e47c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
73634e04f2
avformat/siff: Reject audio packets without audio stream
...
Fixes: Assertion failure
Fixes: 24612/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6600899842277376.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 8931c55789 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
cb667b6460
avformat/mpeg: Check avio_read() return value in get_pts()
...
Found-by: Thierry Foucu <tfoucu@gmail.com >
Fixes: Use-of-uninitialized-value
Reviewed-by: Thierry Foucu <tfoucu@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e8a88a16f7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
8ae6def1e0
avcodec/tiff: Check bpp/bppcount for 0
...
Fixes: division by zero
Fixes: 24253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6250318007107584
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 be090da25f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
f955b6efab
avcodec/snowdec: Sanity check hcoeff
...
Fixes: signed integer overflow: -2147483648 * -1 cannot be represented in type 'int'
Fixes: 24011/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5486376610168832
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 d51d569cf6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
c9a546aeda
avformat/mov: Check comp_brand_size
...
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 24457/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5760093644390400
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 ffa6072fc7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
185a720a4d
avcodec/alac: Check decorr_shift to avoid invalid shift
...
Later the decorrelate_stereo call is guarded by channels == 2
and non-zero decorr_left_weight. Make sure decorr_shift is in
the expected shift range for that case.
Fixes: shift exponent 128 is too large for 32-bit type 'int'
Fixes: 23860/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5751138914402304
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Alexander Strasser <eclipse7@gmx.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 4333718b35 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
fdaead7e23
avcodec/tdsc: Fix tile checks
...
Fixes: out of array access
Fixes: crash.asf
Found-by: anton listov <greyfarn7@yandex.ru >
Reviewed-by: anton listov <greyfarn7@yandex.ru >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 081e3001ed )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Michael Niedermayer
ed54e26463
avcodec/cbs_jpeg: Fix uninitialized end index in cbs_jpeg_split_fragment()
...
Fixes: Out of array read
Fixes: 24043/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5084566275751936.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 4a10bc8f6f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-05 21:28:08 +02:00
Timo Rothenpieler
c9f3835b2b
avcodec/cuviddec: backport extradata fixes
2020-10-01 21:51:44 +02:00
Timo Rothenpieler
05097aff47
avcodec/cuviddec: handle arbitrarily sized extradata
2020-09-30 14:07:58 +02:00
Błażej Szczygieł
03d6632f96
lavf/tls_gnutls: check for interrupt inside handshake loop
...
fixes #8080
Signed-off-by: Błażej Szczygieł <spaz16@wp.pl >
(cherry picked from commit 561ba15c97 )
2020-09-04 21:34:37 +03:00
Jan Ekström
1e7b385199
avformat/tls_schannel: immediately return decrypted data if available
...
Until now, we would have only attempted to utilize already decrypted
data if it was enough to fill the size of buffer requested, that could
very well be up to 32 kilobytes.
With keep-alive connections this would just lead to recv blocking
until rw_timeout had been reached, as the connection would not be
officially closed after each transfer. This would also lead to a
loop, as such timed out I/O request would just be attempted again.
By just returning the available decrypted data, keep-alive based
connectivity such as HLS playback is fixed with schannel.
(cherry picked from commit 6f8826e4aa )
2020-09-04 19:04:55 +03:00
Jan Ekström
93d1993181
avformat/tls_schannel: always decrypt all received data
...
The dec_buf seems to be properly managed between read calls,
and we have no logic to decrypt before attempting socket I/O.
Thus - until now - such data would not be decrypted in case of
connections such as HTTP keep-alive, as the recv call would
always get executed first, block until rw_timeout, and then get
retried by retry_transfer_wrapper.
Thus - if data is received - decrypt all of it right away. This way
it is available for the following requests in case they can be
satisfied with it.
(cherry picked from commit 39977fff20 )
2020-09-04 19:04:06 +03:00
Andreas Rheinhardt
d359b750af
avformat/sdp: Fix potential write beyond end of buffer
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
(cherry picked from commit 5d91b7718e )
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
2020-07-10 21:31:39 +02:00
Andreas Rheinhardt
40e049856e
avformat/mm: Check for existence of audio stream
...
No audio stream is created unconditionally and if none has been created,
no packet with stream_index 1 may be returned. This fixes an assert in
ff_read_packet() in libavformat/utils reported in ticket #8782 .
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
(cherry picked from commit ec59dc73f0 )
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
2020-07-10 21:31:36 +02:00