1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

101999 Commits

Author SHA1 Message Date
Andreas Rheinhardt
f82aaea3ff avcodec/h263: Fix global-buffer-overflow with noout flag2 set
h263_get_motion_length() forgot to take an absolute value;
as a consequence, a negative index was used to access an array.
This leads to potential crashes, but mostly it just accesses what
is to the left of ff_mvtab (unless one uses ASAN), thereby defeating
the purpose of the AV_CODEC_FLAG2_NO_OUTPUT because the sizes of
the returned packets differ from the sizes the encoder would actually
have produced.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 9207dc3b0db368bb9cf5eb295cbc1129c2975e31)
2022-01-11 15:15:53 +01:00
Andreas Rheinhardt
de82f92b84 avcodec/vaapi_encode: Fix segfault upon closing uninitialized encoder
Fixes ticket #9537.
Probably a regression since 2b3206891649f317c20993411efef4bee39ae784.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit d1b47f3bfcc625ca1cae210fc198dcbd54381a88)
2022-01-11 15:15:53 +01:00
Andreas Rheinhardt
1227b4e926 avcodec/movtextenc: Fix infinite loop due to variable truncation
Regression since af043b839c38e850af1184fd6be691f8475c048e.
Fixes ticket #9409.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit bb89a2f64fd1d74cc51af62d5ef133be274dd7af)
2022-01-11 15:15:53 +01:00
Andreas Rheinhardt
0066e79c9e avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overread
av_image_copy() expects an array of four pointers and linesizes
according to its declaration; it currently only pointers that are
actually in use (depending upon the pixel format), but this might
change at any time. It has already happened for the linesizes in
d7bc52bf456deba0f32d9fe5c288ec441f1ebef5 and so increasing their
array fixes a stack-buffer overread.

This fixes a -Wstringop-overflow= and -Wstringop-overread warning
from GCC 11.2.

Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit b0b90100bfda8c5cf95889e00183589de0abce60)
2022-01-11 15:15:52 +01:00
Andreas Rheinhardt
d1f7a44e89 avcodec/libkvazaar: Increase array size
av_image_copy() expects an array of four pointers according to its
declaration; although it currently only touches pointers that
are actually in use (depending upon the pixel format) this might
change at any time (as has already happened for the linesizes
in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5).

This fixes a -Wstringop-overflow= warning with GCC 11.2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit b09ea67b40e342f5e4183e9ebc0c14801ecd218c)
2022-01-11 15:15:52 +01:00
Andreas Rheinhardt
ab8830e348 avformat/aadec: Don't use the same loop counter in inner and outer loop
Due to this bush.aa (from the FATE suite) exported garbage metadata
with key "_040930".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 0a76f8217e0d80d336ad8d9c46523fd3d1262c8c)
2022-01-11 15:15:52 +01:00
Andreas Rheinhardt
703937c494 avformat/moflex: Don't use uninitialized timebase for data stream
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 38e5ca9310b1a4dbb72fbe28769c9119bb880691)
2022-01-11 15:15:52 +01:00
Anton Khirnov
91aa03952a lavf/udp: do not return an uninitialized value from udp_open()
(cherry picked from commit 3c2b67446875f925909fa33d8ee14264e11c293d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
        libavformat/udp.c
2022-01-11 09:17:23 +01:00
Timo Rothenpieler
458c00ea0b avcodec/nvenc: zero-initialize NV_ENC_REGISTER_RESOURCE struct 2022-01-10 15:53:35 +01:00
Andreas Rheinhardt
5a7763bdfa configure: Add missing libshine->mpegaudioheader dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit e228d7b0db7d6cb02a73bee6d3bf4f6ecf92d0bf)
2022-01-06 08:35:49 +01:00
Andreas Rheinhardt
8f153214e3 avcodec/Makefile: Add missing entry for ADPCM_IMA_AMV_ENCODER
Forgotten in 555f5c1fc5ae0c4e7b0431dc3166c3fcf3f4e979.

Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit df4cb384fb68454e23f8cc2b369e344c1bd8be7d)
2022-01-06 08:35:49 +01:00
Andreas Rheinhardt
717c7f4ae9 avcodec/Makefile: Only compile nvenc.o if needed
This fixes compilation errors in case nvenc is enabled
(e.g. autodected) with both nvenc-based encoders disabled
because nvenc uses ff_alloc_a53_sei(), yet only the nvenc-based
encoders require atsc_a53.
(This error does not manifest itself in case of static linking
(nothing pulls in nvenc.o), but it exists with shared builds.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-01-05 19:39:31 +01:00
Fei Wang
2c887141b8 avcodec/av1_vaapi: improve decode quality
- quantizer delta and matrix level specific.
- support loop filter delta.
- support use superres.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit 84c73102d933c9b7f64f504196c91edddad99618)
2021-12-28 20:04:52 +01:00
Fei Wang
582fb329a4 avcodec/av1_vaapi: enable segmentation features
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit dc94f2eaaf0ae623d7dc02e1273c829015c025a3)
2021-12-28 20:04:52 +01:00
Fei Wang
5962698d25 avcodec/av1_vaapi: setting 2 output surface for film grain
VAAPI needs 2 output surface for film grain frame. One used for
reference and the other used for applying film grain and pushing
to downstream.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit 7871144cf801bc8b9e3b00319dd7c3c3d91dd3fa)
2021-12-28 20:04:52 +01:00
Fei Wang
5774a0524c avcodec/vaapi: increase av1 decode pool size
For film grain clip, vaapi_av1 decoder will cache additional 8
surfaces that will be used to store frames which apply film grain.
So increase the pool size by plus 8 to avoid leak of surface.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit 53403158cc19b9e5baeff6af9317f14d1a20d0cb)
2021-12-28 20:04:52 +01:00
Tong Wu
03f5a57b93 avcodec/dxva2_av1: fix global motion params
Defined in spec 5.9.24/5.9.25. Since function void
global_motion_params(AV1DecContext *s) already updates
gm type/params, the wminvalid parameter only need to get
the value from cur_frame.gm_invalid.

Signed-off-by: Tong Wu <tong1.wu@intel.com>
(cherry picked from commit 4e7a7d75e3c21a6af03c4cd52ffc50270664e58a)
2021-12-28 20:04:52 +01:00
Fei Wang
8b9a48b7aa avcodec/av1_vaapi: add gm params valid check
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit 0d0ea70e7bdd85def85d526480d728740a371744)
2021-12-28 20:04:52 +01:00
Fei Wang
481d3930d9 avcodec/av1dec: support setup shear process
Defined in spec 7.11.3.6/7.11.3.7.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit de7475b111679120b3b089fe543224f50882287c)
2021-12-28 20:04:52 +01:00
Fei Wang
2f45969744 avcodec/av1: extend some definitions in spec section 3
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit 75de7fe26218cb37fff9d5afa7b5b2b8bee4a9a8)
2021-12-28 20:04:52 +01:00
Fei Wang
8aab15a91d cbs_av1: fix incorrect data type
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be
most 128. And similar return value for cbs_av1_get_relative_dist.
So if plus them and use int8_t for the result may lose its precision.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
(cherry picked from commit e7ff5722b1abae4284e79da707e71ff82b409699)
2021-12-28 20:04:52 +01:00
James Almer
cc33e73618 avcodec/libdav1d: let libdav1d choose optimal max frame delay
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9a7fe439d969485de698569faa0b42e948cbd753)
2021-11-05 21:38:37 -03:00
James Almer
61ed1182ee avcodec/libdav1d: pass auto threads value to libdav1d
libdav1d 1.0.0 will be the first version supporting Dav1dSettings.n_threads == 0.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit d873b5fffc8292242549c4c026023e370e15c05b)
2021-11-05 21:38:37 -03:00
Michael Niedermayer
7e0d640edf Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n4.4.1
2021-10-23 23:31:29 +02:00
Michael Niedermayer
73e60e4439 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>
2021-10-23 23:31:08 +02:00
Michael Niedermayer
404c9331dd avcodec/ttadsp: Fix integer overflows in tta_filter_process_c()
Fixes: signed integer overflow: 822841647 + 1647055738 cannot be represented in type 'int'
Fixes: 39935/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-4592657142251520

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 f24028c798397af720acb838357785aa705a8122)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
875fbddd7d avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e154353fdb73dc1b3c1519350244d5346f761850)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
32b68a6232 avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2()
Fixes: out of array access
Fixes: 39736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-4820016722214912

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 17e36fac0b5432f67e25adca7186c57f2dbe1c71)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
bac4bb747a avformat/matroskadec: Reset state also on failure in matroska_reset_status()
The calling code does not handle failures and will fail with assertion failures later.
Seeking can always fail even when the position was previously read.

Fixes: Assertion failure
Fixes: 35253/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-4693059982983168

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 d115eec97929e23fd1b06df2d95f48cf5000eb87)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
ea190a10d3 avformat/wavdec: Check smv_block_size
Fixes: Timeout
Fixes: 39554/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-4915221701984256

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 849138f476f4b08656681bfc3aec5beac47777fb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
6de9986c78 avformat/rmdec: Check for multiple audio_stream_info
Fixes: memleak
Fixes: 39166/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5153276690038784

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 8fe3566b8fdf4bcf5eed419c1aab6eb848287ff3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
1abb9ab266 avcodec/apedec: Use 64bit to avoid overflow
Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be represented in type 'int'
Fixes: 39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702

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 f059b56195da9c0e2c11a5f7f357a3d6101e6bf0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
bda2d49896 avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int'
Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208

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 ad517ee6e44f093e28021ffd51c7eb2e1394b1a9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
cb92d65a5b oavformat/avidec: Check offset in odml
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long'
Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480

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 255a7b423ed5e07536bdc72e993056daa4efe009)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Michael Niedermayer
4ae804b6fb avformat/mpegts: use actually read packet size in mpegts_resync special case
Fixes: infinite loop
Fixes: 37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528 -

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 83b2e4c8f15a00f037040131e26e20de83f0d842)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 19:21:14 +02:00
Andreas Rheinhardt
4b583e5425 fftools/ffmpeg: Fix crash when flushing non-fully setup output stream
The output stream's packet may not have been allocated
at that point. This happens when quitting in the following command line:
$ ./ffmpeg -lavfi abuffer=sample_fmt=u8:sample_rate=48000:channel_layout=stereo -f null -

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit fb215798c7a72b32e889b72efd018f26bb3f88ce)
2021-10-08 11:31:37 -03:00
Timo Rothenpieler
c989427c16 avfilter/scale_npp: fix non-aligned output frame dimensions 2021-10-07 18:18:04 +02:00
Steven Liu
9738990542 Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"
This reverts commit b5ca8f2c66954614d81579082025f580efc0cffc.

This commit will make new problem about tickets: 9193,9205
It flush data into file with init file context together,
and it can get keyframe size, maybe need more method to get keyframe
size.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
(cherry picked from commit 59032494e81a1a65c0b960aaae7ec4c2cc9db35a)
2021-10-07 22:08:08 +08:00
Michael Niedermayer
a2bb836e55 Changelog: update 2021-10-05 23:22:23 +02:00
Michael Niedermayer
667d62c603 swscale/alphablend: Fix slice handling
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 06d67265881249566f385309e2fb5a9449720b6e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:40 +02:00
Michael Niedermayer
6825af5c07 avcodec/apedec: Fix integer overflow in filter_fast_3320()
Fixes: signed integer overflow: 2145649668 + 3956526 cannot be represented in type 'int'
Fixes: 38351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4647077926273024

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 0e45886e6ea272f453cb949e95c3bfd8380974c5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:40 +02:00
Michael Niedermayer
71d776740c avformat/mov: Fix last mfra check
Fixes: signed integer overflow: 9223372036854775360 + 536870912 cannot be represented in type 'long'
Fixes: 37940/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6095637855207424

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 451ceb5131fa67b0b380d4823981e421909c16db)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:40 +02:00
Michael Niedermayer
58fdd476f9 avcodec/mxpegdec: Check for AVDISCARD_ALL
Fixes: Fixes NULL pointer dereference
Fixes: 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712
Fixes: 37907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-4725170850365440
Fixes: 37904/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6367889262247936
Fixes: 38085/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5175270823297024

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 20afd3a63a75a160f61a98a8dcfe06f527ea19b4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:40 +02:00
Michael Niedermayer
97f3abe294 avcodec/flicvideo: Check remaining bytes in FLI*COPY
Fixes: Timeout
Fixes: 37795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-4846536543043584

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 5f835efbca874ad42cb954e6788588f52a57a7a2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
7d313a14a1 avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensions
Fixes: out of array access
Fixes: 37197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5877046382297088

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 018b611b4ba74a5cecfb8a75a637b49840e7c320)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
b90ce02f81 avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127
Fixes: index 128 out of bounds for type 'uint16_t [128]'
Fixes: 38651/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6296416058736640

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>
(cherry picked from commit 85413a5ae6948a1d6e4e947a4fca984b8c686016)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
a0e38aceba avcodec/snowdec: Maintain avmv buffer
This avoids reallocating per frame

Fixes: Assertion failure
Fixes: 36359/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6733238591684608
Fixes: 38623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6098656512573440

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 0faf04e807fc09bb3d72a034c284fe44b54fa76b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
02fd9353f2 avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return
Fixes: invalid shift
Fixes: 37018/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG2VIDEO_fuzzer-5290280902328320

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 5a95abcce4d93f979e4b53f2220f7a54edd03312)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
c524a8b4be avcodec/mpegvideo_enc: Limit bitrate tolerance to the representable
Fixes: error: 1.66789e+11 is outside the range of representable values of type 'int'
Fixes: Ticket8201

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 245017ec8a87d6e4c764d06afeca37100b980d85)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00
Michael Niedermayer
bea287bdad avcodec/apedec: Fix integer overflow in intermediate
Fixes: signed integer overflow: 559334865 * 4 cannot be represented in type 'int'
Fixes: 37929/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6751932295806976

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 90da43557f7257d72e95504f63ae6504406d6eab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-05 23:19:39 +02:00