Re: [FFmpeg-devel] [PATCH 1/3] avcodec/rka: avoid undefined multiply in cmode==0

2023-06-03 Thread Michael Niedermayer
On Tue, May 02, 2023 at 05:38:18PM +0200, Michael Niedermayer wrote:
> Fixes: signed integer overflow: -182838 * 32768 cannot be represented in type 
> 'int'
> Fixes: 
> 58179/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5333265899978752
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/rka.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply teh remaining patches of this set

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

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


[FFmpeg-devel] [PATCH 1/3] avcodec/rka: avoid undefined multiply in cmode==0

2023-05-02 Thread Michael Niedermayer
Fixes: signed integer overflow: -182838 * 32768 cannot be represented in type 
'int'
Fixes: 
58179/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5333265899978752

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

diff --git a/libavcodec/rka.c b/libavcodec/rka.c
index 3e86d83819..e4a70f5557 100644
--- a/libavcodec/rka.c
+++ b/libavcodec/rka.c
@@ -732,7 +732,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, 
ACoder *ac, int off, uns
 if (bits == 0) {
 ctx->buf1[off] = sum + val;
 } else {
-ctx->buf1[off] = (val + (sum >> bits)) * (1 << bits) +
+ctx->buf1[off] = (val + (sum >> bits)) * (1U << bits) +
 (((1U << bits) - 1U) & ctx->buf1[off + -1]);
 }
 ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1];
-- 
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-requ...@ffmpeg.org with subject "unsubscribe".