Michael Niedermayer
710e51677a
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 >
2022-03-18 19:56:50 +01:00
Michael Niedermayer
28008bf95e
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 >
2022-03-18 19:56:50 +01:00
Michael Niedermayer
8701af40bc
avcodec/ccaption_dec: Use ff_ass_add_rect2()
...
Fixes: Timeout
Fixes: 42258/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5540144118104064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-18 19:56:50 +01:00
Michael Niedermayer
aed698efc3
avcodec/ass: Faster ff_ass_add_rect()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-18 19:56:50 +01:00
Michael Niedermayer
31916d3d9f
avcodec/alsdec: Set channels from data after data is set
...
Fixes: out of array write
Fixes: 45624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6473487382872064
Fixes: 45626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4874997192065024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-18 12:31:32 +01:00
Michael Niedermayer
b59ea948cd
avcodec/dfpwmdec: Check packet size more completely
...
Fixes: out of array access
Fixes: 45497/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFPWM_fuzzer-5239786212818944.fuzz
Fixes: 45510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFPWM_fuzzer-4947856883056640
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 >
2022-03-18 12:31:32 +01:00
Michael Niedermayer
cb9f17cd28
tools/target_dec_fuzzer: Adjust threshold for TQI
...
Fixes: Timeout
Fixes: 44455/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATQI_fuzzer-6069950551293952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:24 +01:00
Michael Niedermayer
e88b99afdf
avcodec/libuavs3d: Check ff_set_dimensions() for failure
...
Untested, no testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:24 +01:00
Michael Niedermayer
6530c240c8
avcodec/speexdec: Align some comments
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:23 +01:00
Michael Niedermayer
487679cc50
avcodec/speexdec: Use correct doxygen comments
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:23 +01:00
Michael Niedermayer
a13471fd04
tools/target_dec_fuzzer: Adjust threshold for DSICINVIDEO
...
Fixes: Timeout
Fixes: 44829/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-6190334340628480
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:23 +01:00
Michael Niedermayer
18bc612f2f
avcodec/dfa: Optimize output reshuffle loop
...
18035 -> 4018 dezicycles (Tested with LOGOS.DFA, gcc 7, 3950X)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-17 22:27:23 +01:00
Michael Niedermayer
d1bf5b7d96
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-03-17 22:27:23 +01:00
Michael Niedermayer
bd3a03db9a
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 >
2022-03-17 22:27:23 +01:00
Michael Niedermayer
9805a0004c
tools/target_dec_fuzzer: Fix build failure from channels API
...
Regression since 2f8ccca2fa and surrounding commits
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 21:36:33 -03:00
Michael Niedermayer
bf5099b12b
tests: Add fate-bsf-dv-error-marker
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-15 22:52:42 +01:00
Michael Niedermayer
6f9b4b3e15
avcodec: Add dv marker bsf
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-14 19:58:54 +01:00
Michael Niedermayer
31c4c99ff9
tools/target_dec_fuzzer: Adjust threshold for DFA
...
Fixes: Timeout
Fixes: 45351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5768895011618816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-14 19:58:54 +01:00
Michael Niedermayer
1bed27acef
avcodec/argo: Check packet size
...
Fixes: Timeout
Fixes: 45052/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-6033489206575104
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-08 00:47:21 +01:00
Michael Niedermayer
757da974b2
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 >
2022-03-08 00:47:21 +01:00
Michael Niedermayer
ec8ff659f5
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 >
2022-03-08 00:47:21 +01:00
Michael Niedermayer
1c60ad469e
tools/target_dec_fuzzer: Adjust threshold for targa
...
Fixes: Timeout
Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-08 00:47:21 +01:00
Michael Niedermayer
15a646e501
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 >
2022-03-08 00:47:21 +01:00
Michael Niedermayer
b9973b72c0
avfilter/vf_colorlevels: Fix build failure on ARM
...
This fixes building for arm after 10c2ef1ca4 .
The argument to av_clip_uintp2 must be an assembly time immediate
constant.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Reviewed-by and commit message details-by: Martin Storsjö <martin@martin.st >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-03-06 20:16:39 +01:00
Michael Niedermayer
4419433d77
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 >
2022-03-02 17:51:35 +01:00
Michael Niedermayer
70a1024290
avformat/argo_cvg:: Fix order of operations in error check in argo_cvg_write_trailer()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-25 22:23:03 +01:00
Michael Niedermayer
c8c12fb5d6
avformat/argo_asf: Fix order of operations in error check in argo_asf_write_trailer()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-25 22:23:03 +01:00
Michael Niedermayer
c182c70658
avcodec/movtextdec: add () to CMP() macro to avoid unexpected behavior
...
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-25 22:23:03 +01:00
Michael Niedermayer
36680078ca
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 >
2022-02-25 22:23:03 +01:00
Michael Niedermayer
c900f2e42c
tools/target_dem_fuzzer: Check fmt before dereferencing
...
Fixes: NULL pointer dereference
Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-25 22:23:03 +01:00
Michael Niedermayer
1372b30db2
tools/target_dem_fuzzer: Force interrupt for HLS
...
Fixes: Timeout
Fixes: 41580/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5059099224571904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-19 13:27:02 +01:00
Michael Niedermayer
cd4ce3b862
tools/target_dem_fuzzer: Test interrupt callback
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-19 13:27:02 +01:00
Michael Niedermayer
2db9ffb88b
avformat/argo_cvg: Fix checksum
...
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-15 21:36:08 +01:00
Michael Niedermayer
f306b8e80a
avcodec/jpeglsdec: Fix if( code style
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-15 21:35:41 +01:00
Michael Niedermayer
151f83584e
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 >
2022-02-15 21:35:41 +01:00
Michael Niedermayer
8ee0e4abcb
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 >
2022-02-15 21:25:43 +01:00
Michael Niedermayer
ce43e1c581
avcodec/motion_est: fix indention of ff_get_best_fcode()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-09 10:54:30 +01:00
Michael Niedermayer
634312a70f
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 >
2022-02-09 10:54:30 +01:00
Michael Niedermayer
bf33a38499
avformat/hls: Use unsigned for iv computation
...
Fixes: signed integer overflow: 9223372036854775748 + 60 cannot be represented in type 'long'
Fixes: 44417/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5802443881971712
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 >
2022-02-09 10:50:35 +01:00
Michael Niedermayer
6ee283d7d0
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 >
2022-02-09 10:50:35 +01:00
Michael Niedermayer
5038933977
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 >
2022-02-09 10:50:35 +01:00
Michael Niedermayer
59328aabd2
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 >
2022-02-09 10:50:35 +01:00
Michael Niedermayer
9c3d2cbb51
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 >
2022-02-09 10:49:05 +01:00
Michael Niedermayer
948c262099
avformat/utils: keep chapter monotonicity on chapter updates
...
Updating a chapter with the same id does not break monotonicity
Fixes: Timeout
Fixes: 43727/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4960623367159808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-09 10:26:35 +01:00
Michael Niedermayer
d8d9d506a3
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 >
2022-02-01 16:50:27 +01:00
Michael Niedermayer
cd6ac013a0
avcodec/cfhd: Avoid signed integer overflow in coeff
...
Fixes: signed integer overflow: 15244032 * 256 cannot be represented in type 'int'
Fixes: 43504/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4865014842916864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-02-01 16:50:27 +01:00
Michael Niedermayer
c36a5dfc8f
avformat/rawvideodec: check packet size
...
Fixes: division by zero
Fixes: integer overflow
Fixes: 43347/clusterfuzz-testcase-minimized-ffmpeg_dem_V210X_fuzzer-5846911637127168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: lance.lmwang@gmail.com
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-01-13 19:43:03 +01:00
Michael Niedermayer
0c9c9bbd01
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 >
2022-01-07 16:57:10 +01:00
Michael Niedermayer
4be85c9331
lib*/version.h: Bump Versions after release/5.0 branch
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-01-03 22:10:46 +01:00
Michael Niedermayer
f3964a59e1
lib*/version.h: Bump Versions before release/5.0 branch
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-01-03 22:08:31 +01:00
Michael Niedermayer
be91c89bab
doc/APIchanges: Fill in missing things
...
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-01-03 22:01:36 +01:00
Michael Niedermayer
d6b2357edd
avcodec/speexdec: Consider mode in frame size check
...
No speex samples with non default frame sizes are known (to me)
the official speexenc seems to only generate the 3 default ones.
Thus it may be that the fuzzer samples where the first non default
values encountered by the decoder.
Possibly the "<" should be "!="
Fixes: out of array access
Fixes: 42821/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-5640695772217344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2022-01-01 19:30:04 +01:00
Michael Niedermayer
7cee3b3718
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 >
2021-12-30 22:20:14 +01:00
Michael Niedermayer
c217ca7718
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 >
2021-12-30 22:20:14 +01:00
Michael Niedermayer
68f8292aa9
avcodec/targa: Check input size for uncompressed TGA before allocation
...
Fixes: Timeout
Fixes: 42667/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5619236075077632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-30 22:20:14 +01:00
Michael Niedermayer
afdbc940c6
avcodec/tiff: Remove messing with jpeg context
...
The whole concept is just not correct, also as it seems not to be needed
at all, all dng files i have decode without this.
Fixes: various crashes
Fixes: 42937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4625073334517760
Fixes: 42938/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4643368217477120
Fixes: 42939/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4925325908246528
Fixes: 42940/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4925378806808576
Fixes: 42941/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6202009265504256
Fixes: 42944/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6076860998483968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-30 22:20:14 +01:00
Michael Niedermayer
f3a949dc4c
avformat/mvdec: Check bytes_per_sample
...
Fixes: division by zero
Fixes: 42814/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-4787014237552640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org >
Reviewed-by: John-Paul Stewart <jpstewart@personalprojects.net >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-25 11:59:47 +01:00
Michael Niedermayer
10add8bb66
avcodec/cdgraphics: avoid signed overflow in alpha
...
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 42766/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5142826105569280
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 >
2021-12-25 11:59:47 +01:00
Michael Niedermayer
cfa1f0e214
avcodec/tiff: Use ff_set_dimensions() for setting up mjpeg context dimensions
...
sets coded_width / coded_height too to keep them consistent with
width / height
Fixes: OOM
Fixes: 42263/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5653333619113984
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 15:22:06 +01:00
Michael Niedermayer
d6c16f42cc
avcodec/tiff: Pass max_pixels to mjpeg context
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-23 15:22:06 +01:00
Michael Niedermayer
d8ea7a67ba
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 >
2021-12-23 15:22:06 +01:00
Michael Niedermayer
68457c1e85
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 >
2021-12-17 16:15:20 +01:00
Michael Niedermayer
dd94912479
avformat/4xm: Check for duplicate track ids
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
0dcd95ef8a
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 >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
e22ec484aa
avformat/cinedec: Avoid repeatedly allocating packets beyond the input
...
Fixes: Timeout
Fixes: 41025/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5540848285122560
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
8e96410e1b
avcodec/speexdec: Avoid violating the vector_fmul_scalar() API
...
Fixes: out of array access
Fixes: 40054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-6713285764841472
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
562021e2fd
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 >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
bf1e93bdc9
avformat/vivo: Favor setting fps from explicit fractions
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
7b24615565
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 >
2021-12-16 22:31:13 +01:00
Michael Niedermayer
db3fd5ab31
tools/target_dec_fuzzer: Adjust threshold for prores
...
Fixes: Timeout
Fixes: 42072/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-4957999452520448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-16 21:06:47 +01:00
Michael Niedermayer
99b2700f5b
avformat/mvdec: Use 64 bit in timestamp computation
...
Fixes: division by zero
Fixes: 42198/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5054366405492736.fuzz
Fixes: 42222/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-4561249331970048
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 >
2021-12-16 21:06:47 +01:00
Michael Niedermayer
4f44a218e5
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 >
2021-12-09 13:40:54 +01:00
Michael Niedermayer
0ec75723a4
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 >
2021-12-09 13:27:23 +01:00
Michael Niedermayer
1e85a698c0
avcodec/targa: Do not return images when there is no image in the tga
...
Fixes: Timeout
Fixes: 35877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5407292819374080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-09 13:12:45 +01:00
Michael Niedermayer
a4af92d7cb
avformat/mxfdec: Check component_depth in mxf_get_color_range()
...
Fixes: shift exponent 4294967163 is too large for 32-bit type 'int'
Fixes: 41449/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6183636217495552
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 >
2021-12-09 13:12:45 +01:00
Michael Niedermayer
b5ba74053c
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 >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
51d5e90158
avcodec/gemdec: Move all support checks before image allocation
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
e901716daf
tools/target_dec_fuzzer: Adjust threshold for HQ_HQA
...
Fixes: Timeout
Fixes: 41120/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6327761690558464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
cd95ac7e33
tools/target_dec_fuzzer: adjust threshold for gem
...
Fixes: Timeout
Fixes: 42035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5033604191748096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
235ac7b492
avcodec/avpacket: Perform fewer reallocations in repeated av_grow_packet()
...
Fixes: Timeout
Fixes: 41446/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4667644540747776
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
59b4e7cbd8
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 >
2021-12-06 14:25:55 +01:00
Michael Niedermayer
96caa01f13
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 >
2021-12-01 17:44:56 +01:00
Michael Niedermayer
db27a35012
tools/target_dec_fuzzer: Adjust DXA threshold
...
Fixes: Timeout
Fixes: 40203/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXA_fuzzer-4587923496894464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-12-01 17:44:56 +01:00
Michael Niedermayer
6e34d94797
avcodec/gemdec: Check tag & planes before image allocation
...
Fixes: Timeout
Fixes: 41083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5843826518917120
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 >
2021-12-01 17:44:56 +01:00
Michael Niedermayer
3809467d4d
avcodec/iff: limit written bytes to twice the output array size in decode_delta_l()
...
Fixes: Timeout
Fixes: 39436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6624915520880640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-29 17:15:07 +01:00
Michael Niedermayer
76c41a5bfe
tools/target_dec_fuzzer: Disable MB debug after a few iterations
...
This debug code can be quite slow on constructed streams
Fixes: Timeout
Fixes: 38907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6334628852531200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-29 17:15:07 +01:00
Michael Niedermayer
3a64a4c582
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 >
2021-11-29 17:15:07 +01:00
Michael Niedermayer
2877ddddda
avcodec/vqavideo: Use GetByteContext and check for end
...
Fixes: out of array access
Fixes: Timeout
Fixes: 40481/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-6502647583080448
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-29 17:15:07 +01:00
Michael Niedermayer
57adb26d05
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 >
2021-11-26 21:31:06 +01:00
Michael Niedermayer
ff23cee200
avcodec/txd: Move input size checks before allocation
...
Fixes: Timeout
Fixes: 40882/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TXD_fuzzer-4893364584054784
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-26 21:31:06 +01:00
Michael Niedermayer
97c3053d59
avformat/dhav: Limit get_duration() iterations
...
Fixes: Timeout
Fixes: 39971/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5756969890217984
Fixes: 39977/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-5327123053674496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-14 17:51:35 +01:00
Michael Niedermayer
866ad2e952
avcodec/speexdec: Check frames_per_packet more completely
...
Fixes: signed integer overflow: 2105344 * 539033345 cannot be represented in type 'int'
Fixes: out of array write
Fixes: 39956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-4766419250708480
Fixes: 40293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-5219910217760768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-14 17:51:35 +01:00
Michael Niedermayer
2171f97cc8
avformat/aiffdec: "-1" -> AVERROR_INVALIDDATA
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-01 20:37:20 +01:00
Michael Niedermayer
905588df97
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 >
2021-11-01 20:37:20 +01:00
Michael Niedermayer
93f7776921
avformat/aiffdec: sanity check block_align
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-01 20:37:20 +01:00
Michael Niedermayer
1b04836dff
avformat/aiffdec: Check sample_rate
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-11-01 20:37:20 +01:00
Michael Niedermayer
069f7831a2
avfilter/vf_owdenoise: relicense my code
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-24 16:54:36 +02:00
Michael Niedermayer
8316b2a15f
swscale/swscale: Improve *ColorspaceDetails() doxy
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-24 16:54:36 +02:00
Michael Niedermayer
5f3a160b42
swscale/utils: Improve return codes of sws_setColorspaceDetails()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-24 16:54:36 +02:00
Michael Niedermayer
c7699f95bb
swscale/utils: Set all threads to the same colorspace even on failure
...
Fixes: ./ffplay dav.y4m -vf "scale=hd1080:threads=4"
Found-by: Paul
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-10-24 16:54:36 +02:00