1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
Commit Graph

89316 Commits

Author SHA1 Message Date
Michael Niedermayer
384b5dc0f1 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-07-12 22:24:16 +02:00
Michael Niedermayer
7521f2f66c 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-07-12 22:21:51 +02:00
Michael Niedermayer
cddda6d7e4 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-07-12 22:21:20 +02:00
Michael Niedermayer
9722b774c5 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-07-12 22:20:36 +02:00
Michael Niedermayer
a886e9526d 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-07-12 22:10:54 +02:00
Michael Niedermayer
93d44b10e8 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-07-12 22:09:38 +02:00
Michael Niedermayer
06bd0a44a8 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-07-12 22:02:28 +02:00
Michael Niedermayer
6ee5e7a696 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-06-14 19:31:34 +02:00
Michael Niedermayer
c7e436a0b3 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-06-14 17:12:20 +02:00
Michael Niedermayer
4cd065324a 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-06-14 17:11:46 +02:00
Michael Niedermayer
0a330619bf 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-06-14 17:10:25 +02:00
Michael Niedermayer
c5dba22ae4 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-06-14 17:06:21 +02:00
Michael Niedermayer
8775295080 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-06-14 16:56:57 +02:00
Michael Niedermayer
0a3a33311e 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-06-14 16:55:15 +02:00
Michael Niedermayer
1e99ff9d33 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-06-14 16:54:58 +02:00
Michael Niedermayer
bdadddf530 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-06-14 16:53:24 +02:00
Michael Niedermayer
ffb5153d39 Update for 3.4.11
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-11 02:14:22 +02:00
Paul B Mahol
ee981f7ceb avfilter/vf_colorspace: fix memmory leaks
Fixes #8303

(cherry picked from commit fddef964e8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:57:06 +02:00
Andreas Rheinhardt
02fd294a33 avcodec/ac3enc: Fix memleak
Fixes ticket #8294.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 097c917c14)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:54:53 +02:00
James Almer
13dfa80870 avformat/nutenc: don't allocate a dynamic AVIOContext if no index is going to be written
Fixes ticket #8295

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 1d479300cb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:38:37 +02:00
Paul B Mahol
ac6c213c4e avfilter/vf_random: fix memory leaks
Fixes #8296

(cherry picked from commit 3488e0977c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:34:58 +02:00
Paul B Mahol
16eb9939ea avfilter/vf_bwdif: fix heap-buffer overflow
Fixes #8261

(cherry picked from commit 8c3166e1c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:31:57 +02:00
Andreas Rheinhardt
6f6036146d fftools/ffmpeg_opt: Fix leak of options when parsing options fails
Fixes #8094.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 21265f42ec)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:28:19 +02:00
Paul B Mahol
222783e2fa avfilter/vf_edgedetect: fix heap-buffer overflow
Fixes #8275

(cherry picked from commit de598f82f8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:25:28 +02:00
Paul B Mahol
da58e7fb9e avfilter/vf_w3fdif: deny processing small videos
Fixes #8243

(cherry picked from commit 0e68e8c93f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 19:23:47 +02:00
Paul B Mahol
cde751ce49 avfilter/vf_avgblur: fix heap-buffer overflow
Fixes #8274

(cherry picked from commit f069a9c2a6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:49:23 +02:00
Paul B Mahol
c5629402fa avfilter/af_tremolo: fix heap-buffer overflow
Fixes #8317

(cherry picked from commit 58bb9d3a3a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:47:02 +02:00
Paul B Mahol
3ee76a3ddb avfilter/vf_edgedetect: check if height is big enough
Fixes #8260

(cherry picked from commit ccf4ab8c9a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:42:52 +02:00
Paul B Mahol
c1ce4fba51 avfilter/vf_bitplanenoise: fix overreads
Fixes #8244

(cherry picked from commit 0b56723874)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:40:16 +02:00
Paul B Mahol
c72ed4f3eb avfilter/vf_fieldorder: fix heap-buffer overflow
Fixes #8264

(cherry picked from commit 07050d7bdc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:37:30 +02:00
Paul B Mahol
278f86ece9 avfilter/vf_fieldmatch: fix heap-buffer overflow
Also fix use of uninitialized values.

Fixes #8239

(cherry picked from commit ce5274c138)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:34:31 +02:00
James Almer
8296bf3dd0 aformat/movenc: add missing padding to output track extradata
Fixes ticket #8183.

Tested-by: Thierry Foucu <tfoucu@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 58aa0ed8f1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:20:56 +02:00
Paul B Mahol
e1b399c818 avcodec/pngenc: remove monowhite from apng formats
Monowhite pixel format is not supported, and it does not make sense
to add support for it.

Fixes #7989

(cherry picked from commit 5d9f44da46)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 18:17:43 +02:00
Gyan Doshi
64c2815c29 configure: bump year
(cherry picked from commit 2f6360ff21)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-16 10:49:25 +02:00
Michael Niedermayer
148314955b Update for FFmpeg 3.4.10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-13 23:41:11 +02:00
Paul B Mahol
07cb2c8863 avfilter/vf_lenscorrection: make width/height int
Somehow previous correct fix broke usage.

(cherry picked from commit 79522411fa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-13 23:39:50 +02:00
Michael Niedermayer
73c593b0ce 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-13 23:39:50 +02:00
Michael Niedermayer
8ed50e1838 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-13 23:39:50 +02:00
Michael Niedermayer
7ea021e7bf 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-13 23:39:50 +02:00
Oneric
1c73b96c21 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-13 23:39:50 +02:00
Michael Niedermayer
86c204addf 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-13 23:39:50 +02:00
Michael Niedermayer
adcacd0d74 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-13 23:39:50 +02:00
Michael Niedermayer
ea391e65ef 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-13 23:39:50 +02:00
Michael Niedermayer
14eea4ade4 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-13 23:39:50 +02:00
Michael Niedermayer
92521686ce 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-13 23:39:50 +02:00
Michael Niedermayer
4b298c8721 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-13 23:39:50 +02:00
Michael Niedermayer
4e305299d9 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-13 23:39:50 +02:00
Michael Niedermayer
b545c25078 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-13 23:39:50 +02:00
Michael Niedermayer
680f821af3 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-13 23:39:50 +02:00
Michael Niedermayer
b70429e33c 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-13 23:39:50 +02:00