1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 15:58:07 +02:00
Commit Graph

19 Commits

Author SHA1 Message Date
Michael Niedermayer
1ad4782d2a avcodec/siren: Improve the bits left threshold in decode_envelope()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-29 19:52:10 +02:00
Michael Niedermayer
109113b54f avcodec/siren: Check available bits in decode_envelope()
Fixes: Timeout
Fixes: 39089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-6677219854909440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-29 19:52:10 +02:00
Peter Ross
855014ff83 avcodec/siren: add checksum calculation
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-28 21:23:26 +10:00
Peter Ross
e40593c050 avcodec/siren: don't reduce getbitcontext size by checksum_bits at initialisation
this allows the checksum calculation routine to also use getbitcontext

Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-28 21:23:26 +10:00
Peter Ross
b007e8968f avcodec/siren: prevent getbitcontext overread
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-28 21:23:26 +10:00
Michael Niedermayer
db18f29b33 avcodec/siren: Check index for catergory5
Fixes: out of array access
Fixes: 38603/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-5741847809490944.fuzz

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-09-19 20:12:32 +02:00
Peter Ross
20f9cfb3e3 avcodec/siren: decode_vector: remove unused parameter
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-09 18:38:16 +10:00
Peter Ross
e8aec714d3 avcodec/siren: replace magic numbers with macro value
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-09 18:38:16 +10:00
Peter Ross
c655a734b1 avcodec/siren: MSN Siren decoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-07 18:07:11 +10:00
Andreas Rheinhardt
1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
Andreas Rheinhardt
a247ac640d avcodec: Constify AVCodecs
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:15 -03:00
Michael Niedermayer
f3e4ebb007 avcodec/siren: Increase noise category 5 and 6
The entry read is not used in subsequent computation, thus its
value is not important.

Fixes: out of array read
Fixes: 28578/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-6332019122503680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-28 21:06:56 +01:00
Michael Niedermayer
e847cabb60 avcodec/siren: Factorize category 5 and 6 noise computation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-28 21:06:55 +01:00
Michael Niedermayer
1208872946 avcodec/siren: remove constant region_size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-28 21:06:54 +01:00
Anton Khirnov
e15371061d lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
They are not properly namespaced and not intended for public use.
2021-01-01 14:14:57 +01:00
Michael Niedermayer
34f5a59ad5 avcodec: Set AV_CODEC_CAP_CHANNEL_CONF in more decoders
Suggested-by: Paul B Mahol <onemda@gmail.com>
See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channels
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-11-28 00:41:51 +01:00
Michael Niedermayer
3197b0099b avcodec/siren: Fix integer overflow in get_dw()
Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented in type 'int'
Fixes: 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584

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>
2020-03-19 02:19:25 +01:00
Michael Niedermayer
12ec8ad24b avcodec/siren: Check several indexes
Fixes: Multiple out of array accesses
Fixes: 20817/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5754041227542528.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-03-04 23:20:32 +01:00
Paul B Mahol
464310c160 avcodec: add siren audio decoder 2020-02-20 14:41:26 +01:00