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

114868 Commits

Author SHA1 Message Date
Michael Niedermayer
624f15e77d
avformat/mpeg: Check len in mpegps_probe()
Fixes: CID1473590 Untrusted loop bound

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ca237a841e9e78ac02694124d81ff78c74b0bf72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:20 +02:00
Michael Niedermayer
a4f8bb40e1
avformat/mxfenc: resurrects the error print
Fixes: CID1524681 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a469e48b6dd8c9dfd0cd7dba7b28d1987168ed8b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:20 +02:00
Michael Niedermayer
266ea4d840
avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure
Fixes: CID1591939 Logically dead code

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

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 86cd7c68bc65df6703391f0cdcdbf7c57d6c4780)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:19 +02:00
Michael Niedermayer
45b2c1f810
avcodec/vc1_loopfilter: Factor duplicate code in vc1_b_h_intfi_loop_filter()
Fixes: CID1435168

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63ecce9ba87867b21a7cdcd677bb268c0d807db1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:19 +02:00
Michael Niedermayer
8c378a78c9
avcodec/vvc/ctu: Remove dead ret check
Fixes: CID1560040 Logically dead code

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

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d22a33710acb004f90c7454daf8145c3943ecbeb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:18 +02:00
Michael Niedermayer
886045ca87
avformat/img2dec: assert no pipe on ts_from_file
Help coverity with CID1500302 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4824156fa06bd60b27f9f0673fbd6a3cfc780e56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:18 +02:00
Michael Niedermayer
d304d1ea30
avcodec/cbs_jpeg: Try to move the read entity to one side in a test
The checked entity should be alone on one side of the check, this avoids
complex considerations of overflows.
This fixes a issue of bad style in our code and a coverity issue.

Fixes: CID1439654 Untrusted pointer read

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

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

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

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

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 97b2ab15de964d9455aa902ab616881f76d2cb67)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:16 +02:00
Michael Niedermayer
8941956c32
avformat/mov: Check edit list for overflow
Fixes: 67492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5778297231310848
Fixes: signed integer overflow: 2314885530818453536 + 7782220156096217088 cannot be represented in type 'long'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2882d30e3acfc3155e2be11db653c7c721f94f34)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:16 +02:00
Michael Niedermayer
2191f4f5d6
fftools/ffmpeg: Check read() for failure
Fixes: CID1591932 Ignoring number of bytes read

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 34fd247c3bf06418c1eaafacf0d6052e3bbe4f5e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:16 +02:00
Michael Niedermayer
2d8a4ca3b1
avcodec/vvc/dec: Check ff_init_cabac_decoder() for failure
Fixes: signed integer overflow: 1107820800 + 1107820800 cannot be represented in type 'int'
Fixes: left shift of 1091059712 by 6 places cannot be represented in type 'int'
Fixes: 69910/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-5162839971528704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6398242bb2b9bfdef9d7fd4614a3518ffb1fefec)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:15 +02:00
Michael Niedermayer
01af7b97e6
MAINTAINERS: Add Timo Rothenpieler to server admins
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ca4ff242d897c4bb0dbff49cb9d7a758ffc5f2a5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:15 +02:00
Michael Niedermayer
345ff46a69
swscale/output: Avoid undefined overflow in yuv2rgb_write_full()
Fixes: signed integer overflow: -140140 * 16525 cannot be represented in type 'int'
Fixes: 68859/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4516387130245120

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 c221c7422f07f2245db5c4cdc958b42ca25eb2b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:15 +02:00
Michael Niedermayer
b3e53af1e5
swscale/output: alpha can become negative after scaling, use multiply
Fixes: left shift of negative value -3245
Fixes: 69047/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6571511551950848

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 9e6c5b6e865a6b1b9c3a471fc06143f11e69d71b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:14 +02:00
Michael Niedermayer
d478214f72
avcodec/targaenc: Allocate space for the palette
Fixes: out of array access
Fixes: 68927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5105665067515904

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 4a7220bd5c1871827ee0edba14fc88f63173e169)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:14 +02:00
Michael Niedermayer
806be9f6b6
avcodec/r210enc: Use av_rescale for bitrate
Fixes: signed integer overflow: 281612954574848 * 65344 cannot be represented in type 'long'
Fixes: 68956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_R210_fuzzer-6459074458746880

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 d34d4b6a7ce7fa72239c47d22ab6592d0687ac86)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:14 +02:00
Michael Niedermayer
045cc9c037
avcodec/jfdctint_template: Fewer integer anomalies
Fixes: signed integer overflow: 105788 * -20995 cannot be represented in type 'int'
Fixes: signed integer overflow: 923211729 + 2073948236 cannot be represented in type 'int'
Fixes: signed integer overflow: 1281179284 + 2073948236 cannot be represented in type 'int'
Fixes: 68975/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-6266769177116672
Fixes: 68997/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-6284237161431040

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 228f255b5d9b839149cd53f0537ce76b068228ae)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:13 +02:00
Michael Niedermayer
4e40e893cc
avcodec/snowenc: MV limits due to mv_penalty table size
Fixes: out of array read
Fixes: 69673/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5476592894148608

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 3a9292aff320d7b5048b371b1babea2f9b3c4e69)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:13 +02:00
Michael Niedermayer
ee71ffc8f0
tools/target_dec_fuzzer: Adjust threshold for MV30
Fixes: 60867/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-6381933108527104
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 f81602fb3ac5b5ff68a3d5425117c1562371242f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:13 +02:00
Michael Niedermayer
7180b3f213
tools/target_dec_fuzzer: Adjust threshold for jpeg2000
Fixes: Timeout
Fixes: 57385/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5394334324490240

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 749994194cc222f6ee01762b16c0574a947e0e9f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:12 +02:00
Michael Niedermayer
40cca1cf87
avformat/mxfdec: Check container_ul->desc before use
Fixes: CID1592939 Dereference after null check

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 4cab028bd0e381f2ed4ccb7f139407f1f6f537c0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:12 +02:00
Michael Niedermayer
13067aa562
avcodec/libvpxenc: Cleanup on error
This or fifo needs to be freed on errors explicitly

Fixes: memleak
Fixes: 68937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-4830831016214528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b2ced61eba03a1afc83e37614c6635ee9f2b551)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:12 +02:00
Michael Niedermayer
8abfa9e42f
MAINTAINERS: Update the entries for the release maintainer for FFmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 97ecfb5a193c43eef2e47b3e45afd3fc629c107d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:11 +02:00
Michael Niedermayer
9d7811aa65
doc/developer: Provide information about git send-email and gmail
The 2 links are the clearest i found.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 959cb2e2e36cad50b88d45c1201c2c3d64d4e48c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:11 +02:00
Michael Niedermayer
c818250194
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 9c9f095e30c196c0e3d510dc5300182ddb49a803)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:11 +02:00
Michael Niedermayer
d44a75849c
avformat/mov: Use int64_t in intermediate for corrected_dts
Fixes: CID1500312 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 034054b3706bea8524cf8846813e17636ca5ab33)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:10 +02:00
Michael Niedermayer
488aa52371
avformat/mov: Use 64bit in intermediate for current_dts
Fixes: CID1500304 Unintentional integer overflow
Fixes: CID1500318 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c977d37aad609f6ed7d148c012da8bc83df8f0b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:10 +02:00
Michael Niedermayer
9e6950dcb4
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 019fce18bb0628ac8bc47a81d647a23d604b6123)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:09 +02:00
Michael Niedermayer
871c89e0ba
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 0263b6a48caaff839e4c28df15b299b89c7da92d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:09 +02:00
Michael Niedermayer
b8ee22e1dd
avformat/img2dec: Little JFIF / Exif cleanup
This changes the behavior and makes it behave how it probably was intended.
Either way this is unlikely to result in any user visible change

Fixes: CID1494637 Missing break in switch

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5712f36dd0ee0144b92edd2147e24b3724d7ec89)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:09 +02:00
Michael Niedermayer
2ea4dfd684
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 7d04c6016b0971fecb890d3a0afe4e6706a1a68e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:08 +02:00
Michael Niedermayer
54f57cb532
avformat/imfdec: Simplify get_next_track_with_minimum_timestamp()
This also makes the code more robust

Fixes: CID1512414 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f10493f6fc2a79f706138d90420a4369b9655a47)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:08 +02:00
Michael Niedermayer
1973b87dda
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 78d6d13babc62fa14727ee590e5a9661f23a0d9f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:08 +02:00
Michael Niedermayer
45eabb1ef6
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 d9b9fc4be26014eb7221d9bbc297a5323d5ad40b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:07 +02:00
Michael Niedermayer
b09cadf2ef
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 5b82852519e92a2b94de0f22da1a81df5b3e0412)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:07 +02:00
Michael Niedermayer
ca087aac86
avcodec/libx264: Check init_get_bits8() return code
Fixes: CID1594529 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dce69ba89e37a956236b30663be893b7dae1567b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:07 +02:00
Michael Niedermayer
caed56c6c5
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 8a64a003b5d567354e82af679e056615c8464a6f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:06 +02:00
Michael Niedermayer
58dc78387d
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 9b76e49061a321467df23f7b1c8e8e715c8dec71)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:06 +02:00
Michael Niedermayer
02cb95ba0c
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 4ac7405aafb8e66dff2ac926f33b7ff755f224cf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:06 +02:00
Michael Niedermayer
063c906f1f
avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced
If its not replaced we would have a negative index used in an array potentially

Helps: CID1440385 Negative array index read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6106177ad66ab28f44520534f386239d2405eeab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:05 +02:00
Michael Niedermayer
d2295ca945
avcodec/pcm-dvdenc: 64bit pkt-size
It seems nothing prevents such overflow even though odd

Fixes: CID1441934 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 160b81ce2a87b0835125da7c72ab7ed8c0918c45)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:05 +02:00
Michael Niedermayer
23e085b743
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 19db9636c52c040d364fe9af94ddeeb1ecfd2c2a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:05 +02:00
Michael Niedermayer
8689e9d178
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 161d0aa2a8d18f1f8a01cbc4c1061eadcbe592e5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:04 +02:00
Michael Niedermayer
5dc3069673
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 d741638042d827aed994b819857d6587121627ab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:04 +02:00
Michael Niedermayer
956f4cc431
avcodec/rv34: assert that size is not 0 in rv34_gen_vlc_ext()
Helps: CID1548380 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e5098589b0ca74b3f52e09bae277306a1fc0cd43)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-25 20:34:04 +02:00