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