Re: [FFmpeg-devel] [PATCH 2/2] avutil/common: Fix integer overflow in av_ceil_log2_c()

2020-06-30 Thread Michael Niedermayer
On Sun, Jun 28, 2020 at 01:46:53AM +0200, Michael Niedermayer wrote:
> Fixes: left shift of 1913647649 by 1 places cannot be represented in type 
> 'int'
> Fixes: 
> 23572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5082619795734528
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavutil/common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

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

Never trust a computer, one day, it may think you are the virus. -- Compn


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 2/2] avutil/common: Fix integer overflow in av_ceil_log2_c()

2020-06-27 Thread Michael Niedermayer
Fixes: left shift of 1913647649 by 1 places cannot be represented in type 'int'
Fixes: 
23572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5082619795734528

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

diff --git a/libavutil/common.h b/libavutil/common.h
index 2777cea9f9..92b721a59c 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -371,7 +371,7 @@ static av_always_inline av_const double av_clipd_c(double 
a, double amin, double
  */
 static av_always_inline av_const int av_ceil_log2_c(int x)
 {
-return av_log2((x - 1) << 1);
+return av_log2((x - 1U) << 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".