1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

114854 Commits

Author SHA1 Message Date
Michael Niedermayer
62a772263e
avfilter/vf_tiltandshift: Free dst on error
Fixes: CID1559901 Resource leak

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 20e59af07e5e9a73cb3227355fe0a78afffdfe45)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:33 +02:00
Michael Niedermayer
f07a35b5e5
doc/examples/mux: remove nop
Found through code review related to CID1604493 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e6c0c5731e85f00b5840d9a7d14e38cc3e07d5bc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:32 +02:00
Michael Niedermayer
eebdb93d94
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 93e0265e27e6dd567812a8661988109421c5447a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:32 +02:00
Michael Niedermayer
3b70bc4bd6
avformat/rtpenc_rfc4175: Use 64bit in computation if copy_offset
Found while reviewing: CID1494441 Untrusted value as argument

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f13ae632591b043cb69b66de01e8b178037cdd0e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:31 +02:00
Michael Niedermayer
b93e62052f
avformat/rtmpproto: Use AV_DICT_MATCH_CASE instead of litteral number
Found by reviewing: CID1530166 Free of array-typed value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 38c2e6a2c7c993d2076984de4ddd9776259397db)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:31 +02:00
Michael Niedermayer
a0988dae8e
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 cedbef03946625bc0f7f96e9f77ad59c512b9900)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:31 +02:00
Michael Niedermayer
594c2086fa
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 665be4fa2f47910bf85a6f17b6cac9dabc6591f0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:30 +02:00
Michael Niedermayer
740fb498e1
avutil/wchar_filename: Correct sizeof
Fixes: CID1591930 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 e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:30 +02:00
Michael Niedermayer
d7912a6d4a
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 628ba061c8d5ae018c3e8aa8ce05b8dfcdfd8410)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:30 +02:00
Michael Niedermayer
19631babab
avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error
Fixes: CID1598558 Resource leak

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cf22f944d55c8eb0119fb20354a625f8c41eb11f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:29 +02:00
Michael Niedermayer
6f452f4ea0
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 698ed0d5a5a3a1219179facb5538eea463fae13f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:29 +02:00
Michael Niedermayer
dad5fcb33d
avcodec/vvc/refs: Use unsigned mask
Not a bugfix, but might fix CID1604361 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit eb552ecd543ad656c40849c6b2bcaf5fd667c9b9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:29 +02:00
Michael Niedermayer
f3505e4d29
doc/examples/vaapi_encode: Try to check fwrite() for failure
Fixes: CID1604548 Unused value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e4bfff21192aed328c906c85424737128b108f1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:28 +02:00
Michael Niedermayer
6b76648dc0
avformat/usmdec: Initialize value
Fixes: CID1551685 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 06191386396344ee1906c6016b7d94ee8754fd61)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:28 +02:00
Michael Niedermayer
a88516b6f7
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 f022afea77ced5067f511530dd8ff137967db1d9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:28 +02:00
Michael Niedermayer
b2f7532ac7
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 426d8c84c37064eef93bbcfaffd886d00a9a4ee8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:27 +02:00
Michael Niedermayer
a7beed1a11
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 2a0a7d964bfd5da8859c715627eeb7a048bddb79)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:27 +02:00
Michael Niedermayer
6b1e91a52c
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 c8200d382503f5fd839a72af7ba93d53880ad4b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:27 +02:00
Michael Niedermayer
75c8afab03
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 498ce4e8b82e2312690613df45f87e592dcb91a9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:26 +02:00
Michael Niedermayer
2f0fe13450
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 9bb38ba2b782cdb6052ddcb415ef1554b0462401)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:26 +02:00
Michael Niedermayer
6cf8d4ea3d
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 7a9ddb705152d5090d2cb815f905bf592cc487f5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:26 +02:00
Michael Niedermayer
b2da9efb71
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 382e9e79f3a0011d93af4b11ca6ba6b85113a09a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:25 +02:00
Michael Niedermayer
9b52ca7ca5
swscale/swscale: Use ptrdiff_t for linesize computations
This is unlikely to make a difference

Fixes: CID1591896 Unintentional integer overflow
Fixes: CID1591901 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 66b60bae68a3124fb176b0c2d4580f0f76c31dc4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:25 +02:00
Michael Niedermayer
9ca0577c5e
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
Fixes: CID1503088 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 62d4414d54f57612ac444643a92de7d10455b6c6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:25 +02:00
Michael Niedermayer
acd5523b7a
avfilter/af_afir: Assert format
Maybe helps: CID1516805 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5c815f937a80d7689bc0f2deb3ac968f2630176)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:24 +02:00
Michael Niedermayer
315766e290
avfilter/af_afftdn: Assert format
Maybe helps: CID1515514 Uninitialized scalar variable
Maybe helps: CID1515517 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8f9a6c4ea8de3e58f32622424c97203e6ba582c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:24 +02:00
Michael Niedermayer
9f2917aaf3
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 5fe8bf4aa51350b14d0babd47b0314232e703caf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:24 +02:00
Mark Thompson
3c85e12e5a
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 7110a36ba07f85ca2996d3b99898a4819e72d9bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:23 +02:00
Michael Niedermayer
dd3075434e
avfilter/af_mcompand: compute half frequency in double
Fixes: CID1422217 Result is not floating-point

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d0d502ff10378e545a1fe42a9503ab44d19fa67)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:23 +02:00
Michael Niedermayer
adab1e6f0c
avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds
Maybe Helps: CID1503077 Bad bit shift operation

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cef720ab429244ac9e56f48d983d6086e0a227a7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:23 +02:00
Michael Niedermayer
ca5ffb7f46
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
Fixes: CID1503078 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7a0ea15c7afb8abd823303b9a525cc5e6572f199)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:22 +02:00
Michael Niedermayer
4d00378da8
tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 380a8213b165d1fda419c566241d2641cb6f5c3c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:22 +02:00
Michael Niedermayer
38f2f4555a
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 c296d4fdec198a32ea3995e312cede7be83352c7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:22 +02:00
Michael Niedermayer
7e2396e890
avfilter/drawutils: Fix depthb computation
Fixes: CID1496940 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 34f821e44821804e1954ca6eb38269183978a62c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:21 +02:00
Michael Niedermayer
09806744cc
avfilter/avf_showcwt: Check av_parse_video_rate() for failure
Fixes: CID1539147 Unused value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit aab0c344c5d1d5b1020f87c62da3e523161a660f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:21 +02:00
Michael Niedermayer
82dcc0fb8e
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 0d0373de3bc6aa6fa5c71247191afccfaf20723d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:21 +02:00
Michael Niedermayer
624f15e77d
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 ca237a841e9e78ac02694124d81ff78c74b0bf72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:20 +02:00
Michael Niedermayer
a4f8bb40e1
avformat/mxfenc: resurrects the error print
Fixes: CID1524681 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a469e48b6dd8c9dfd0cd7dba7b28d1987168ed8b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:20 +02:00
Michael Niedermayer
266ea4d840
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 4c285bb2789667bcf014ede8b0ab06ebbbee833f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:20 +02:00
Michael Niedermayer
c40b96982d
avcodec/mfenc: check IMFSample_ConvertToContiguousBuffer() for failure
Fixes: CID1591911 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 86cd7c68bc65df6703391f0cdcdbf7c57d6c4780)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:19 +02:00
Michael Niedermayer
45b2c1f810
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 63ecce9ba87867b21a7cdcd677bb268c0d807db1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:19 +02:00
Michael Niedermayer
8c378a78c9
avcodec/vvc/ctu: Remove dead ret check
Fixes: CID1560040 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 97ae47f9e928f6163dfbfbe30415c253ae8780bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:19 +02:00
Michael Niedermayer
1056db9bf8
avcodec/vvc/dec: Remove constant eos_at_start
Fixes: CID1560041 'Constant' variable guards dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d22a33710acb004f90c7454daf8145c3943ecbeb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:18 +02:00
Michael Niedermayer
886045ca87
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 4824156fa06bd60b27f9f0673fbd6a3cfc780e56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:18 +02:00
Michael Niedermayer
d304d1ea30
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 385784a148d2886884aac69acc31bf179fac3ac2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:18 +02:00
Michael Niedermayer
bd3a6b6681
fftools/ffplay: Check vulkan_params
Fixes: CID1550133 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4bca1474157f19cbf80a64f055ecd655060f9f1b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:17 +02:00
Michael Niedermayer
4042d01660
fftools/ffmpeg_enc: Initialize Decoder
Fixes: CID1591439 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 935d9a57120b5b322555af611d3871ce3084bbf1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:17 +02:00
Michael Niedermayer
031c758482
fftools/ffmpeg_enc: Initialize fd
Fixes: CID1520677 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 462bd44b032c660abb8d450d342adea3aba89e06)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:17 +02:00
Michael Niedermayer
43dfbdcae5
fftools/ffmpeg_enc: simplify opaque_ref check
Found-while-revieweing: CID1520670 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 97b2ab15de964d9455aa902ab616881f76d2cb67)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:16 +02:00
Michael Niedermayer
8941956c32
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 2882d30e3acfc3155e2be11db653c7c721f94f34)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:16 +02:00