[FFmpeg-devel] [PATCH] avcodec/celp_math: avoid overflow in shift

Michael Niedermayer michael at niedermayer.cc
Fri Sep 22 22:31:12 EEST 2023


On Thu, Sep 07, 2023 at 11:24:42PM +0200, Michael Niedermayer wrote:
> by making gain unsigned we have 1 bit more available
> alternatively we can clip twice as in the g729 reference
> 
> Fixes: left shift of 23404 by 17 places cannot be represented in type 'int'
> Fixes: 61728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-6280412547383296
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/celp_math.h      | 2 +-
>  libavcodec/g729postfilter.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

will apply

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230922/f1a10ece/attachment.sig>


More information about the ffmpeg-devel mailing list