[FFmpeg-devel] [PATCH 1/3] avcodec/osq: Fix signed integer overflow in update_stats()

Michael Niedermayer michael at niedermayer.cc
Mon Jun 23 15:32:26 EEST 2025


On Tue, Jun 17, 2025 at 03:17:23AM +0200, Michael Niedermayer wrote:
> Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
> Fixes: 410109093/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6550900028276736
> 
> Note, none of the available osq files uses update_stats(), this change may fix or break
> files using coding_mode == 2. The code prior looks wrong though
> 
> 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/osq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply patchset

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20250623/f840d431/attachment.sig>


More information about the ffmpeg-devel mailing list