Lynne
41a5eae142
configure: update copyright year
...
(cherry picked from commit b95ee2ec5f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-15 00:38:19 +02:00
Michael Niedermayer
5dcac90c77
Update for 4.3.7
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 21:09:22 +02:00
Michael Niedermayer
ef18ef4085
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-14 11:11:55 +02:00
Michael Niedermayer
316bd5787b
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-14 11:11:55 +02:00
Michael Niedermayer
bf5ba9a170
avformat/libzmq: Check av_strstart()
...
Fixes: CID1453457 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 0263b6a48c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:55 +02:00
Michael Niedermayer
c81fd6fd6d
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-14 11:11:54 +02:00
Michael Niedermayer
413b07402e
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-14 11:11:54 +02:00
Michael Niedermayer
4a91134a18
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-14 11:11:54 +02:00
Michael Niedermayer
5b392f4983
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-14 11:11:53 +02:00
Michael Niedermayer
b06c0e8b83
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-14 11:11:53 +02:00
Michael Niedermayer
02b37af177
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-14 11:11:53 +02:00
Michael Niedermayer
ea1e12e029
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-14 11:11:52 +02:00
Michael Niedermayer
32fc533b2c
avcodec/notchlc: Check init_get_bits8() for failure
...
Fixes: CID1500300 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 19db9636c5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:52 +02:00
Michael Niedermayer
9bd68c46a6
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-14 11:11:52 +02:00
Michael Niedermayer
86a2543744
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-14 11:11:51 +02:00
Michael Niedermayer
99c8b0ac22
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-14 11:11:51 +02:00
Michael Niedermayer
a6502919bd
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-14 11:11:51 +02:00
Michael Niedermayer
36c061fe22
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-14 11:11:50 +02:00
Michael Niedermayer
4546c600c6
avformat/fwse: Remove always false expression
...
Fixes: CID1460758 Operands don't affect result
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 348c3a7ffe )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:50 +02:00
Michael Niedermayer
2cca78ee68
avformat/asfdec_f: Use 64bit for preroll computation
...
Fixes: CID1500342 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 70b4994762 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:50 +02:00
Michael Niedermayer
2b79276114
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-14 11:11:49 +02:00
Michael Niedermayer
9c605c88a9
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-14 11:11:49 +02:00
Michael Niedermayer
9e5d40ff9f
avcodec/tiff: Assert init_get_bits8() success in horizontal_fill()
...
Helps: CID1441167 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8814cedb07 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:49 +02:00
Michael Niedermayer
b9924b244e
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-14 11:11:48 +02:00
Michael Niedermayer
d180fa89cb
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-14 11:11:48 +02:00
Michael Niedermayer
8d969d2778
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-14 11:11:48 +02:00
Michael Niedermayer
6b0671a644
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-14 11:11:47 +02:00
Michael Niedermayer
5cca477c51
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-14 11:11:47 +02:00
Michael Niedermayer
25826459d9
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-14 11:11:47 +02:00
Michael Niedermayer
b84b27b360
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-14 11:11:46 +02:00
Michael Niedermayer
590a0b5f33
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-14 11:11:46 +02:00
Michael Niedermayer
419c77c81a
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-14 11:11:46 +02:00
Michael Niedermayer
b7deab84be
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-14 11:11:45 +02:00
Michael Niedermayer
52f7861420
avcodec/qsvdec: Check av_image_get_buffer_size() for failure
...
Fixes: CID1477406 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 8789c550fa )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:45 +02:00
Michael Niedermayer
749a3cdae8
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-14 11:11:45 +02:00
Michael Niedermayer
a06d3b96fd
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-14 11:11:44 +02:00
Michael Niedermayer
4f5ae895ce
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-14 11:11:44 +02:00
Michael Niedermayer
a0af91c348
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-14 11:11:44 +02:00
Michael Niedermayer
ef80220f32
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-14 11:11:43 +02:00
Michael Niedermayer
682b002d15
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-14 11:11:43 +02:00
Michael Niedermayer
62ffa50af2
doc/examples/demux_decode: Simplify loop
...
Fixes: CID1463550 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 91d27f7e02 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:43 +02:00
Michael Niedermayer
816ac9de67
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-14 11:11:42 +02:00
Michael Niedermayer
27326d0e09
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-14 11:11:42 +02:00
Michael Niedermayer
11410efb23
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-14 11:11:42 +02:00
Michael Niedermayer
2a49bf5713
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-14 11:11:41 +02:00
Michael Niedermayer
98a7a5000f
avformat/kvag: Check sample_rate
...
Fixes: Division by 0
Fixes: -copyts -start_at_zero -itsoffset 00:00:01 -itsscale 1 -ss 00:00:02 -i zgclab/ffmpeg_crash/poc1 output.mp4
Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit c26a762ea1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-06-14 11:11:41 +02:00
Michael Niedermayer
72c789e028
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-06-14 11:11:41 +02:00
Michael Niedermayer
121fae5591
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-06-14 11:11:40 +02:00
Michael Niedermayer
c8a5242a54
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-06-14 11:11:40 +02:00
Michael Niedermayer
473663d536
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-06-14 11:11:39 +02:00
Michael Niedermayer
1bff9db691
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-06-14 11:11:39 +02:00
Michael Niedermayer
fe924faa2f
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-06-14 11:11:39 +02:00
Andreas Rheinhardt
78cf22f399
avcodec/x86/vp3dsp_init: Set correct function pointer, fix crash
...
Regression since fd172185580c1ccdcfb90bbfdb59fa806fad3117;
triggered by vp4/KTkvw8dg1J8.avi in the FATE suite, but not
when running fate as this code is not used when the bitexact
flag is set.
Bisecting done by ami_stuff, patch from user Mika Fischer
in ticket #10027 (which this commit fixes).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
(cherry picked from commit c3ca90a92e )
2024-05-22 17:34:48 +02:00
Andreas Rheinhardt
f0fff36b1d
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 21:19:58 +02:00
Michael Niedermayer
ed81994a14
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 21:19:57 +02:00
Michael Niedermayer
4bb78609a3
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 21:19:57 +02:00
Michael Niedermayer
71da96b772
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 21:19:57 +02:00
Michael Niedermayer
d04239ba7c
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 21:19:57 +02:00
Michael Niedermayer
cf1b7ab0ec
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 21:19:56 +02:00
Michael Niedermayer
d5877b21a2
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 21:19:56 +02:00
Michael Niedermayer
251b3c3892
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 21:19:56 +02:00
Michael Niedermayer
0c7d6c4eea
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 21:19:55 +02:00
Michael Niedermayer
8f5b0e1249
avformat/wavdec: satuarte next_tag_ofs, data_end
...
Fixes: signed integer overflow: 5053074104798691550 + 5053074104259715104 cannot be represented in type 'long'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-6515315309936640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 61dca9e150 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:55 +02:00
Michael Niedermayer
21b8fbf060
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 21:19:55 +02:00
Michael Niedermayer
a94b67bab4
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 21:19:54 +02:00
Michael Niedermayer
dae887cfd0
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 21:19:54 +02:00
Michael Niedermayer
ae348065a8
avformat/jacosubdec: Use 64bit for abs
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5401294942371840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 746203af31 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:54 +02:00
Michael Niedermayer
0889e913be
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 21:19:53 +02:00
Michael Niedermayer
2c9832bca2
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 21:19:53 +02:00
Michael Niedermayer
4ddc5bc4bd
avcodec/hcadec: do not set hfr_group_count to invalid values
...
Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-6247136417087488
Fixes: out of array write
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit addb85ea39 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:53 +02:00
Michael Niedermayer
2e396e6ca8
avformat/concatdec: clip outpoint - inpoint overflow in get_best_effort_duration()
...
An alternative would be to limit all time/duration fields to below 64bit
Fixes: signed integer overflow: -93000000 - 9223372036839000000 cannot be represented in type 'long long'
Fixes: 64546/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5110813828186112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit dd733b2be4 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:52 +02:00
Michael Niedermayer
d633748e02
avformat/jacosubdec: clarify code
...
add comments, rename variables and indent things differently
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit e83e8d443b )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:52 +02:00
Michael Niedermayer
37306dd667
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 21:19:52 +02:00
Michael Niedermayer
d30403b7a7
avformat/iff: Saturate avio_tell() + 12
...
Fixes: signed integer overflow: 9223372036854775796 + 12 cannot be represented in type 'long long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4898373660704768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b8e754525c )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:51 +02:00
Michael Niedermayer
42f495fbe1
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 21:19:51 +02:00
Michael Niedermayer
9557810a81
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 21:19:51 +02:00
Michael Niedermayer
794eb4f536
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 21:19:50 +02:00
Michael Niedermayer
0c2fffba79
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 21:19:50 +02:00
Michael Niedermayer
8064fc02d9
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 21:19:50 +02:00
Michael Niedermayer
d2e9778f98
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 21:19:49 +02:00
Michael Niedermayer
e92cc45c14
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 21:19:49 +02:00
Michael Niedermayer
facfb2d25d
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 21:19:49 +02:00
Michael Niedermayer
4f8ef0c274
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 21:19:48 +02:00
Michael Niedermayer
8887a0df3c
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 21:19:48 +02:00
Michael Niedermayer
dde3d17274
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 21:19:48 +02:00
Michael Niedermayer
1796dc942c
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 21:19:47 +02:00
Michael Niedermayer
0845294d7c
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 21:19:47 +02:00
Romain Beauxis
294ec29bde
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 21:19:47 +02:00
Michael Niedermayer
4c80dceeb9
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 21:19:46 +02:00
Michael Niedermayer
22ef17004c
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 21:19:46 +02:00
Michael Niedermayer
49e71a2a93
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 21:19:46 +02:00
Michael Niedermayer
fc4095e438
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 21:19:45 +02:00
Michael Niedermayer
77ad8e90c1
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 21:19:45 +02:00
Michael Niedermayer
651ed7555a
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 21:19:45 +02:00
Michael Niedermayer
aa26e3fce7
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 21:19:44 +02:00
Michael Niedermayer
e6d1ed99ae
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 21:19:44 +02:00
Michael Niedermayer
5715c8ed18
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 21:19:44 +02:00
Michael Niedermayer
4d9f97ffb1
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 21:19:43 +02:00
Michael Niedermayer
a3eb80824f
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 21:19:43 +02:00
Michael Niedermayer
bb9390148c
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 21:19:43 +02:00
Michael Niedermayer
3044269ae8
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 21:19:42 +02:00
Brad Smith
033d431f15
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 21:19:42 +02:00
Michael Niedermayer
581b4c6958
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 21:19:42 +02:00
Dale Curtis
84b928f90f
avformat/mov: Fix integer overflow in mov_read_packet().
...
Fixes https://crbug.com/1499669 :
runtime error: signed integer overflow: 9223372036853334272 + 1375731456
cannot be represented in type 'int64_t' (aka 'long')
Signed-off-by: Dale Curtis <dalecurtis@chromium.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 2182173a69 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:41 +02:00
Martin Storsjö
bd7a10a2a8
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 21:19:41 +02:00
Michael Niedermayer
5c66a58602
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 21:19:41 +02:00
Michael Niedermayer
7272c11132
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 21:19:40 +02:00
Frank Plowman
d6b9852317
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 21:19:40 +02:00
Frank Plowman
6a9e2b4cda
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 21:19:40 +02:00
Matthew White
2c49783d05
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 21:19:39 +02:00
Matthew White
84ffcbd810
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 21:19:39 +02:00
Andreas Rheinhardt
3d7330a39f
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 21:19:39 +02:00
Michael Niedermayer
0077a817a1
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 21:19:38 +02:00
Michael Niedermayer
30ee2f61ae
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 21:19:38 +02:00
Michael Niedermayer
272887983c
avformat/mxfdec: Check klv offset
...
Fixes: Assertion klv_offset >= mxf->run_in failed at libavformat/mxfdec.c:736
Fixes: 62936/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5778404366221312.fuzz
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 70f5fa6325 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:38 +02:00
Sean McGovern
71843d8174
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 21:19:37 +02:00
Michael Niedermayer
89745c5354
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 21:19:37 +02:00
Michael Niedermayer
8b9e9ba0c2
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 21:19:37 +02:00
Michael Niedermayer
1ccf76fd72
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 21:19:36 +02:00
Michael Niedermayer
e449d52810
avcodec/h264_parser: saturate dts a bit
...
Fixes: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6112289464123392
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7fedbc7606 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:36 +02:00
Michael Niedermayer
b73688e921
avformat/asfdec_f: Saturate presentation time in marker
...
Fixes: signed integer overflow: -9223372036315799520 - 3873890816 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5009302746431488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit cedb4736f5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:36 +02:00
Michael Niedermayer
330e0a691c
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 21:19:35 +02:00
Michael Niedermayer
6d95339161
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 21:19:35 +02:00
Michael Niedermayer
af121ad20d
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 21:19:35 +02:00
Michael Niedermayer
75d9ad3759
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 21:19:34 +02:00
Michael Niedermayer
5765e49ec3
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 21:19:34 +02:00
Michael Niedermayer
2f663c6125
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 21:19:34 +02:00
Michael Niedermayer
8316cec3b1
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 21:19:33 +02:00
Michael Niedermayer
18743477da
avformat/jacosubdec: avoid signed integer overflows in get_shift()
...
Fixes: signed integer overflow: 22014562800 * 934633746 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5189603246866432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 32447b149f )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:33 +02:00
Michael Niedermayer
022e8c9021
avformat/jacosubdec: Factorize code in get_shift() a bit
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6490b9aed6 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:33 +02:00
Michael Niedermayer
ee6d5dd13b
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 21:19:32 +02:00
Michael Niedermayer
454eac7b87
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 21:19:32 +02:00
Michael Niedermayer
5371943592
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 21:19:32 +02:00
Michael Niedermayer
8101135606
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 21:19:31 +02:00
Michael Niedermayer
9fd6d62eb5
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 21:19:31 +02:00
Michael Niedermayer
559b379cbd
avformat/concatdec: Check in/outpoint for overflow
...
Fixes: signed integer overflow: 91542414454000000 - -9154241494546000000 cannot be represented in type 'long'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4739147999084544
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 dedc78b4b5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:31 +02:00
Michael Niedermayer
83c99e5ac1
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 21:19:30 +02:00
Michael Niedermayer
242f410a70
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 21:19:30 +02:00
Michael Niedermayer
225c89f402
tools/target_dec_fuzzer: Adjust threshold for rtv1
...
Fixes: 60499/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RTV1_fuzzer-5020295866744832
Fixes: Timeout
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9ee87245c5 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:30 +02:00
Michael Niedermayer
0318ed865b
avformat/hls: reduce default max reload to 3
...
The 1000 did result in the appearance of a never ending reload loop
The RFC mandates that "If the client reloads a Playlist file and finds that it has not
changed, then it MUST wait for a period of one-half the target
duration before retrying." and if it has changed
"the client MUST wait for at least the target duration before attempting to reload the
Playlist file again"
Trying to reload 3 times seems a better default than 1000 given these
durations
Issue found by: Сергей Колесников
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5f810435c2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:29 +02:00
Michael Niedermayer
12437cfbf0
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 21:19:29 +02:00
Michael Niedermayer
9e9a7cc4fa
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 21:19:29 +02:00
Michael Niedermayer
e93ee8f8d8
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 21:19:28 +02:00
Michael Niedermayer
10212e7a0f
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 21:19:28 +02:00
Michael Niedermayer
8659d16f68
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 21:19:28 +02:00
Michael Niedermayer
cb4ffd639e
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 21:19:27 +02:00
Michael Niedermayer
98c823f60c
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 21:19:27 +02:00
Michael Niedermayer
4695759985
avcodec/apedec: Fix CRC for 24bps and bigendian
...
Fixes CRC for vlc.ape and APE_48K_24bit_2CH_02_01.ape
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 696e161919 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:27 +02:00
Michael Niedermayer
13d0022307
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 21:19:26 +02:00
Michael Niedermayer
5a88bf8ee7
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 21:19:26 +02:00
Michael Niedermayer
53e3119d0f
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 21:19:26 +02:00
Michael Niedermayer
949636ca60
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 21:19:25 +02:00
Michael Niedermayer
2c57b7c65b
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 21:19:25 +02:00
Michael Niedermayer
5524362efb
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 21:19:25 +02:00
Michael Niedermayer
99c01fa0df
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 21:19:24 +02:00
Michael Niedermayer
9280883d98
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 21:19:24 +02:00
Michael Niedermayer
72c57f8938
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 21:19:24 +02:00
Michael Niedermayer
2dcc7dbba8
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 21:19:23 +02:00
Michael Niedermayer
724f2b3fbd
avformat/oggparsetheora: clip duration within 64bit
...
Fixes: signed integer overflow: 9079256848778919936 - -288230376151711746 cannot be represented in type 'long'
Fixes: 58248/clusterfuzz-testcase-minimized-ffmpeg_dem_OGG_fuzzer-6326851353313280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit b1c3d81e71 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:23 +02:00
Michael Niedermayer
006ac8b4b5
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 21:19:23 +02:00
Michael Niedermayer
b56dc43f8f
avcodec/tiff: add a zero DNG_LINEARIZATION_TABLE check
...
Fixes: index 4294967295 out of bounds for type 'uint16_t [65536]'
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5950405086674944
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6666195176914944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6e98cf0280 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-04-14 21:19:22 +02:00
Michael Niedermayer
98310766fc
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 21:19:22 +02:00
Michael Niedermayer
cfdd9a59ff
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 21:19:22 +02:00
Michael Niedermayer
8d93e90c6d
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 21:19:21 +02:00
Michael Niedermayer
941c6191fc
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 21:19:21 +02:00
Michael Niedermayer
8b8c610821
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 21:19:21 +02:00
Michael Niedermayer
22106d274b
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 21:19:20 +02:00
Michael Niedermayer
d4966d6324
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 21:19:20 +02:00
Michael Niedermayer
99e0f485a5
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 21:19:20 +02:00
Rémi Denis-Courmont
93ecf08934
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:50:26 -03:00
Anton Khirnov
031c9601d0
lavc/pthread_frame: avoid leaving stale hwaccel state in worker threads
...
This state is not refcounted, so make sure it always has a well-defined
owner.
Remove the block added in 091341f2ab , as
this commit also solves that issue in a more general way.
(cherry picked from commit cc867f2c09 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
(cherry picked from commit 35aa7e70e7ec350319e7634a30d8d8aa1e6ecdda)
Signed-off-by: Anton Khirnov <anton@khirnov.net >
(cherry picked from commit 3bc28e9d1ab33627cea3c632dd6b0c33e22e93ba)
Signed-off-by: Anton Khirnov <anton@khirnov.net >
(cherry picked from commit d4b7b3c03e )
2024-04-03 18:50:26 -03:00
Eugene Zemtsov
cda5d4698c
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:11 -03:00
Timo Rothenpieler
fa9a0e7f3e
avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointer
2024-03-30 00:26:32 +01:00
James Almer
4d2cc90fa4
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:02 -03:00
Hendrik Leppkes
f74196e146
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:48:57 +02:00
Hendrik Leppkes
74d424470c
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:48:57 +02:00
Hendrik Leppkes
410ccbbe8c
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:48:57 +02:00
Hendrik Leppkes
865eca9321
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:48:57 +02:00
Jiasheng Jiang
d811434b5d
avformat/nutdec: Add check for avformat_new_stream
...
Check for failure of avformat_new_stream() and propagate
the error code.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 9cf652cef4 )
2023-04-16 10:51:12 -03:00
Michael Niedermayer
91b54b3bba
Update for FFmpeg 4.3.6
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-16 02:22:28 +02:00
Michael Niedermayer
538fe62224
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-15 22:38:13 +02:00
Michael Niedermayer
07990a8d62
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-15 22:38:13 +02:00
Michael Niedermayer
9db48c5bc7
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-15 22:38:12 +02:00
Michael Niedermayer
40c0e965c6
avcodec/j2kenc: Fix funky bpno errors on decoding
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 816676085e )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:12 +02:00
Michael Niedermayer
e25d8a4228
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-15 22:38:12 +02:00
Michael Niedermayer
b66b297e58
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-15 22:38:11 +02:00
Michael Niedermayer
abddc911ff
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-15 22:38:11 +02:00
Michael Niedermayer
8ee94724df
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-15 22:38:11 +02:00
Lynne
382347055d
configure: update copyright year
...
(cherry picked from commit 62da0b4a74 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:10 +02:00
Michael Niedermayer
f6961854f6
avcodec/tests/snowenc: Fix 2nd test
...
(cherry picked from commit 163013c724 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:10 +02:00
Michael Niedermayer
6363556eba
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-15 22:38:10 +02:00
Michael Niedermayer
f682b22cef
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-15 22:38:09 +02:00
Michael Niedermayer
a7eca40cb8
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-15 22:38:09 +02:00
Michael Niedermayer
ebbf85def8
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-15 22:38:09 +02:00
Michael Niedermayer
c561d93039
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-15 22:38:08 +02:00
Michael Niedermayer
1e6706193f
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-15 22:38:08 +02:00
Michael Niedermayer
4bd974e426
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-15 22:38:08 +02:00
Michael Niedermayer
f07f46121a
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-15 22:38:07 +02:00
Michael Niedermayer
1ddfac5fad
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-15 22:38:07 +02:00
Michael Niedermayer
bc8b9111d3
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-15 22:38:07 +02:00
Michael Niedermayer
7b5c345525
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-15 22:38:06 +02:00
Michael Niedermayer
4abb9d14b9
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-15 22:38:06 +02:00
Michael Niedermayer
f0ecc9b12f
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-15 22:38:06 +02:00
Michael Niedermayer
88069ea6c9
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-15 22:38:05 +02:00
Michael Niedermayer
284116d32d
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-15 22:38:05 +02:00
Michael Niedermayer
d29a054915
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-15 22:38:05 +02:00
Michael Niedermayer
b84a46de00
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-15 22:38:04 +02:00
Michael Niedermayer
8488b49faf
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-15 22:38:04 +02:00
Michael Niedermayer
4c9ba64d54
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-15 22:38:04 +02:00
Michael Niedermayer
b353459820
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-15 22:38:03 +02:00
Michael Niedermayer
79d40346f5
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-15 22:38:03 +02:00
Michael Niedermayer
54635b3b98
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-15 22:38:03 +02:00
Michael Niedermayer
83ae0935ab
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-15 22:38:02 +02:00
Michael Niedermayer
76ab2538ed
avformat/mxfdec: Use 64bit in remainder
...
Fixes: signed integer overflow: 48000 * 223587 cannot be represented in type 'int'
Fixes: 54513/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5817594836025344
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 64a04fc165 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:02 +02:00
Michael Niedermayer
7b51ee2dab
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-15 22:38:02 +02:00
Michael Niedermayer
9667007462
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-15 22:38:01 +02:00
Michael Niedermayer
0e5ce7ac7e
avcodec/wavpack: Check for end of input in wv_unpack_dsd_high()
...
Fixes: Timeout
Fixes: 50793/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-4980185027444736
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 6ad7403bce )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:01 +02:00
Michael Niedermayer
93a685accc
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-15 22:38:01 +02:00
Michael Niedermayer
6507719760
avcodec/tiff: Ignore tile_count
...
Fixes: out of array access
Fixes: 52427/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4849108968144896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 65ce417828 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-04-15 22:38:00 +02:00
Michael Niedermayer
1ff546c033
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-15 22:38:00 +02:00
Michael Niedermayer
8f89df7df9
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-15 22:38:00 +02:00
Michael Niedermayer
9ee16a0ba2
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-15 22:37:59 +02:00
Michael Niedermayer
19d7bbc1f0
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-15 22:37:59 +02:00
Michael Niedermayer
f09a1d83da
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-15 22:37:59 +02:00
Michael Niedermayer
d1c90886cc
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-15 22:37:58 +02:00
Michael Niedermayer
a321349464
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-15 22:37:58 +02:00
Michael Niedermayer
5b23daa99f
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-15 22:37:58 +02:00
James Almer
c3981b30a8
avfilter/vf_untile: swap the chroma shift values used for plane offsets
...
Fixes ticket #10265
Signed-off-by: James Almer <jamrial@gmail.com >
(cherry picked from commit dc61d5cf19 )
2023-03-16 17:10:43 -03:00
Jiasheng Jiang
7694a44baa
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 >
2022-12-18 07:50:02 -03:00
Timo Rothenpieler
540b9826b3
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:24 +01:00
James Almer
3b11b5f2f3
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:46:53 -03:00
Martin Storsjö
3993a90732
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:19 +02:00
Michael Niedermayer
74b7488739
Update for 4.3.5
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-10-10 21:50:30 +02:00
Michael Niedermayer
400d2d91b3
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-10 21:49:58 +02:00
Michael Niedermayer
bc246da376
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-09-26 16:51:04 +02:00
Michael Niedermayer
a411aba2c9
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-09-26 16:51:04 +02:00
Michael Niedermayer
a9eaeba875
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-09-26 16:51:03 +02:00
Michael Niedermayer
48b2e91f98
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-09-26 16:51:03 +02:00
Michael Niedermayer
765b73c9be
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-09-26 16:51:03 +02:00
Michael Niedermayer
964fb9f59f
avformat/sbgdec: Check ts_int in genrate_intervals
...
There is probably a better place to check for this, but better
here than nowhere
Fixes: signed integer overflow: -9223372036824775808 - 86400000000 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6601162580688896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 5f529e9147 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:51:02 +02:00
Michael Niedermayer
f24aa3a531
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-09-26 16:51:02 +02:00
Michael Niedermayer
d3c80525b0
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-09-26 16:51:02 +02:00
Michael Niedermayer
fc0678a1fd
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-09-26 16:51:01 +02:00
Michael Niedermayer
71e8a575da
avformat/jacosubdec: Fix overflow in get_shift()
...
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-6722544461283328
Fixes: signed integer overflow: 48214448 * 60 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 b1a68127bb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:51:01 +02:00
Michael Niedermayer
78ed283608
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-09-26 16:51:01 +02:00
Michael Niedermayer
650f0f97db
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-09-26 16:51:00 +02:00
Michael Niedermayer
bf9ac33cff
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-09-26 16:51:00 +02:00
Michael Niedermayer
080c074c25
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-09-26 16:51:00 +02:00
Michael Niedermayer
2cdc8254eb
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-09-26 16:50:59 +02:00
Michael Niedermayer
b591a55e7a
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-09-26 16:50:59 +02:00
Michael Niedermayer
68d39d6a4b
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-09-26 16:50:59 +02:00
Michael Niedermayer
7b7e6478d9
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-09-26 16:50:58 +02:00
Michael Niedermayer
663fa835cc
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-09-26 16:50:58 +02:00
Michael Niedermayer
37ac298e09
avcodec/mjpegdec: Check for unsupported bayer case
...
Fixes: out of array access
Fixes: 51462/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-662559341582745
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit dd81cc22b3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:58 +02:00
Michael Niedermayer
5aecf2c1c0
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-09-26 16:50:57 +02:00
Michael Niedermayer
3cf9bfa0d1
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-09-26 16:50:57 +02:00
Michael Niedermayer
900c4ffc48
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-09-26 16:50:57 +02:00
Michael Niedermayer
25d79ebbf5
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-09-26 16:50:56 +02:00
Michael Niedermayer
787e3af5de
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-09-26 16:50:56 +02:00
Michael Niedermayer
9f1c9e4879
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-09-26 16:50:56 +02:00
Michael Niedermayer
51d8a691dd
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-09-26 16:50:55 +02:00
Michael Niedermayer
6106a5c936
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-09-26 16:50:55 +02:00
Michael Niedermayer
f550cdb732
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-09-26 16:50:55 +02:00
Michael Niedermayer
4f552c1906
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-09-26 16:50:54 +02:00
Michael Niedermayer
4d1fd5c454
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-09-26 16:50:54 +02:00
Michael Niedermayer
16d6003b32
avcodec/midivid: Perform lzss_uncompress() before ff_reget_buffer()
...
This would avoid regeting the frame on lzss errors
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 628fb97efb )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:54 +02:00
Michael Niedermayer
d9c15655f9
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-09-26 16:50:53 +02:00
Michael Niedermayer
47e4bab57a
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-09-26 16:50:53 +02:00
Michael Niedermayer
33a6f36c0a
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-09-26 16:50:53 +02:00
Michael Niedermayer
fd78668885
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-09-26 16:50:52 +02:00
Michael Niedermayer
ace963dd18
avformat/subviewerdec: Make read_ts() more flexible
...
Fixes: signed integer overflow: -1948269928 * 10 cannot be represented in type 'int'
Fixes: 49451/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6344614822412288
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit 58a8e739ef )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:52 +02:00
Michael Niedermayer
8cafce035c
avcodec/mjpegdec: bayer and rct are incompatible
...
Fixes: out of array read
Fixes: 49434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5208501080686592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit a44f5a5212 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:52 +02:00
Michael Niedermayer
bb6316e323
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-09-26 16:50:51 +02:00
Michael Niedermayer
5c145953a9
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-09-26 16:50:51 +02:00
Michael Niedermayer
0edd5feafa
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-09-26 16:50:51 +02:00
Michael Niedermayer
b60d9730cf
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-09-26 16:50:50 +02:00
Michael Niedermayer
a17ba6b3ce
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-09-26 16:50:50 +02:00
Michael Niedermayer
69a441a922
tools/target_dec_fuzzer: Adjust threshold for MMVIDEO
...
Fixes: Timeout
Fixes: 49003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MMVIDEO_fuzzer-5550368423018496
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 3592b05c84 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:50 +02:00
Michael Niedermayer
9ea37d4849
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-09-26 16:50:49 +02:00
Michael Niedermayer
23c31ef285
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-09-26 16:50:49 +02:00
Michael Niedermayer
15263eb8c2
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-09-26 16:50:49 +02:00
Michael Niedermayer
aec94df69b
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-09-26 16:50:48 +02:00
Michael Niedermayer
bb8e5b221f
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-09-26 16:50:48 +02:00
Michael Niedermayer
4b668fbf7e
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-09-26 16:50:48 +02:00
Michael Niedermayer
4ae28bbb37
avcodec/tiff: Check pixel format types for dng
...
Fixes: out of array access
Fixes: 48271/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6149705769287680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 75f3d1b822 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:47 +02:00
Michael Niedermayer
cc1b0a022c
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-09-26 16:50:47 +02:00
Michael Niedermayer
f2039a7ba3
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-09-26 16:50:47 +02:00
Michael Niedermayer
6edd2ad5cc
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-09-26 16:50:46 +02:00
Michael Niedermayer
3f3ee1489d
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-09-26 16:50:46 +02:00
Michael Niedermayer
576fbcafbd
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-09-26 16:50:46 +02:00
Michael Niedermayer
c40b7f3ceb
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-09-26 16:50:45 +02:00
Michael Niedermayer
97aee79b97
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-09-26 16:50:45 +02:00
Michael Niedermayer
3d630709b4
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-09-26 16:50:45 +02:00
Michael Niedermayer
080579e126
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-09-26 16:50:44 +02:00
Michael Niedermayer
c97bc2ae05
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-09-26 16:50:44 +02:00
Michael Niedermayer
cc75815142
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-09-26 16:50:44 +02:00
Michael Niedermayer
9846935523
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-09-26 16:50:43 +02:00
Michael Niedermayer
7dc0967032
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-09-26 16:50:43 +02:00
Michael Niedermayer
9b3c804d6a
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-09-26 16:50:43 +02:00
Michael Niedermayer
d12d83bae9
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-09-26 16:50:42 +02:00
Michael Niedermayer
2cbed362ae
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-09-26 16:50:42 +02:00
Michael Niedermayer
9620d845b3
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-09-26 16:50:42 +02:00
Michael Niedermayer
207557ebe8
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-09-26 16:50:42 +02:00
Michael Niedermayer
94805bc829
avcodec/libxavs2: Improve r redundancy in occured
...
Reviewed-by: "mypopy@gmail.com " <mypopy@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit f3b7ba21ba )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:41 +02:00
Michael Niedermayer
40982beb03
avformat/libzmq: Improve r redundancy in occured
...
Reviewed-by: "mypopy@gmail.com " <mypopy@gmail.com >
(cherry picked from commit e06b1ba7d7 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:41 +02:00
Michael Niedermayer
75eb7a648a
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-09-26 16:50:41 +02:00
Michael Niedermayer
52e229f611
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-09-26 16:50:40 +02:00
Michael Niedermayer
203e2e5315
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-09-26 16:50:40 +02:00
Michael Niedermayer
d7508841a4
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-09-26 16:50:40 +02:00
Paul B Mahol
50cadf8dc5
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: James Almer <jamrial@gmail.com >
(cherry picked from commit e06e89f627 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:39 +02:00
Gyan Doshi
073df4767e
configure: bump year
...
(cherry picked from commit 2f6360ff21 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-09-26 16:50:30 +02:00
Christopher Degawa
efb046ab26
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:00 +02:00
Timo Rothenpieler
6ffc0e3198
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:47:59 +02:00
Michael Niedermayer
1d746bd00e
Changelog: update
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-16 00:17:55 +02:00
James Almer
d6853d17a3
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:31 -03:00
James Almer
497c32486c
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:07:11 -03:00
Michael Niedermayer
e681f720f8
Update for FFmpeg 4.3.4
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:40:59 +02:00
Michael Niedermayer
a671e18128
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-06 20:38:06 +02:00
Michael Niedermayer
5359c1ceda
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-06 20:38:06 +02:00
Michael Niedermayer
d909850308
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-06 20:38:06 +02:00
Oneric
f160c24f77
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-06 20:38:06 +02:00
Michael Niedermayer
e1a5738b73
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-06 20:38:06 +02:00
Michael Niedermayer
4d1674cccf
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-06 20:38:06 +02:00
Michael Niedermayer
a9045143da
avformat/mxfdec: Do not clear array in mxf_read_strong_ref_array() before writing
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 7aebdb8bf1 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:38:06 +02:00
Michael Niedermayer
565bb5fe7b
avformat/mxfdec: Check for avio_read() failure in mxf_read_strong_ref_array()
...
Fixes: 42827/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4900528511909888
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 8d6f49cfc3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:38:06 +02:00
Michael Niedermayer
b88abd3ac2
avformat/mxfdec: Check count in mxf_read_strong_ref_array()
...
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 3015c556f3 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:38:06 +02:00
Michael Niedermayer
023b7e7979
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-06 20:38:06 +02:00
Michael Niedermayer
a1baef131a
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-06 20:38:06 +02:00
Michael Niedermayer
90ef9b5139
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-06 20:38:06 +02:00
Michael Niedermayer
2be7eea648
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-06 20:38:06 +02:00
Michael Niedermayer
b19cc796ea
avcodec/mjpegbdec: Set buf_size
...
Fixes: Timeout
Fixes: 45170/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5874820431085568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:38:06 +02:00
Michael Niedermayer
5032883c34
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-06 20:38:06 +02:00
Michael Niedermayer
fa2e4afe8d
avcodec/g729_parser: Check channels
...
Fixes: signed integer overflow: 10 * 808464428 cannot be represented in type 'int'
Fixes: assertion failure
Fixes: ticket9651
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
(cherry picked from commit 757da974b2 )
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-04-06 20:38:06 +02:00
Michael Niedermayer
0225b8947b
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-06 20:38:06 +02:00
Michael Niedermayer
7251a22f97
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-06 20:38:06 +02:00
Michael Niedermayer
54a0324ad9
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-06 20:38:06 +02:00
Michael Niedermayer
69691dbb3a
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-06 20:38:06 +02:00
Michael Niedermayer
56c8235332
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-06 20:38:06 +02:00
Michael Niedermayer
2dcc5ef710
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-06 20:38:06 +02:00
Michael Niedermayer
d06715c5c2
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-06 20:38:06 +02:00
Michael Niedermayer
ca7ee1cd26
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-06 20:38:05 +02:00
Michael Niedermayer
9a7effc78d
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-06 20:38:05 +02:00
Michael Niedermayer
228d006790
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-06 20:38:05 +02:00
Michael Niedermayer
f20e08ed58
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-06 20:38:05 +02:00
Michael Niedermayer
a2932f6e98
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-06 20:38:05 +02:00
Michael Niedermayer
2564ac2764
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-06 20:38:05 +02:00
Michael Niedermayer
3a718e3bbb
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-06 20:38:05 +02:00
Michael Niedermayer
671850fe55
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-06 20:38:05 +02:00
Michael Niedermayer
429eaaf16e
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-06 20:38:05 +02:00
Michael Niedermayer
c45013d6c5
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-06 20:38:05 +02:00
Michael Niedermayer
ddc21f54c3
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-06 20:38:05 +02:00
Michael Niedermayer
80940eedf2
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-06 20:38:05 +02:00
Michael Niedermayer
4a45cd806e
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-06 20:38:05 +02:00
Michael Niedermayer
75befad4c0
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-06 20:38:05 +02:00
Michael Niedermayer
5a2a340d64
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-06 20:38:05 +02:00
Michael Niedermayer
480f1a198c
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-06 20:38:05 +02:00
Michael Niedermayer
deba3d0372
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-06 20:38:05 +02:00
Michael Niedermayer
d80dbe6505
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-06 20:38:05 +02:00
Michael Niedermayer
aea824467c
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-06 20:38:05 +02:00
Michael Niedermayer
58368cc528
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-06 20:38:05 +02:00
Michael Niedermayer
784303ca01
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-06 20:38:05 +02:00
Michael Niedermayer
a452eddfad
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-06 20:38:05 +02:00
Michael Niedermayer
867b978dc9
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-06 20:38:05 +02:00
Michael Niedermayer
0b0d4f141b
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-06 20:38:05 +02:00
Michael Niedermayer
00530ff352
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-06 20:38:05 +02:00
Michael Niedermayer
b52cad186c
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-06 20:38:05 +02:00
Michael Niedermayer
e3a69dd7a0
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-06 20:38:05 +02:00
Michael Niedermayer
e8a3e30a85
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-06 20:38:05 +02:00
James Almer
15a0ff81c5
avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure
...
We still own it on failure, and there's no point trying to feed it again.
This should address the issue reported in dav1d #383 and part of VLC #26259 .
Signed-off-by: James Almer <jamrial@gmail.com >
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com >
2022-02-01 13:11:11 -03:00
Andreas Rheinhardt
c6fa5a8d04
configure: Add missing libshine->mpegaudioheader dependency
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
(cherry picked from commit e228d7b0db )
2022-01-06 08:44:13 +01:00