Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/bonk: Fix undefined overflow in predictor_calc_error()
@ 2023-10-05 19:44 Michael Niedermayer
  2023-10-05 19:44 ` [FFmpeg-devel] [PATCH 2/5] avformat/usmdec: do not return 0 when no packet was produced Michael Niedermayer
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michael Niedermayer @ 2023-10-05 19:44 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: signed integer overflow: -2146469728 - 1488954 cannot be represented in type 'int'
Fixes: 62490/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5612782399389696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/bonk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c
index 6cd6a0af619..65679e5fb65 100644
--- a/libavcodec/bonk.c
+++ b/libavcodec/bonk.c
@@ -270,7 +270,7 @@ static inline int shift(int a, int b)
 
 static int predictor_calc_error(int *k, int *state, int order, int error)
 {
-    int i, x = error - shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT);
+    int i, x = error - (unsigned)shift_down(k[order-1] * (unsigned)state[order-1], LATTICE_SHIFT);
     int *k_ptr = &(k[order-2]),
         *state_ptr = &(state[order-2]);
 
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-15 23:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 19:44 [FFmpeg-devel] [PATCH 1/5] avcodec/bonk: Fix undefined overflow in predictor_calc_error() Michael Niedermayer
2023-10-05 19:44 ` [FFmpeg-devel] [PATCH 2/5] avformat/usmdec: do not return 0 when no packet was produced Michael Niedermayer
2023-10-10 11:24   ` Anton Khirnov
2023-10-15 23:10     ` Michael Niedermayer
2023-10-05 19:44 ` [FFmpeg-devel] [PATCH 3/5] avcodec/cbs_h2645: Fix showing bits at the end in cbs_read_ue_golomb() Michael Niedermayer
2023-10-05 19:44 ` [FFmpeg-devel] [PATCH 4/5] avcodec/cbs_h2645: Fix showing bits at the end in cbs_read_se_golomb() Michael Niedermayer
2023-10-05 19:44 ` [FFmpeg-devel] [PATCH 5/5] avcodec/xvididct: Make c* unsigned to avoid undefined overflows Michael Niedermayer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git