Re: [FFmpeg-devel] [PATCH 4/4] avcodec/ilbcdec: Simplify use of unsigned and fix more undefined overflows

2019-07-08 Thread Michael Niedermayer
On Mon, Jul 01, 2019 at 12:16:51AM +0200, Michael Niedermayer wrote:
> Fixes: signed integer overflow: 2147475672 + 8192 cannot be represented in 
> type 'int'
> Fixes: 
> 15415/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5712074128228352
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/ilbcdec.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

will apply

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


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 4/4] avcodec/ilbcdec: Simplify use of unsigned and fix more undefined overflows

2019-06-30 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147475672 + 8192 cannot be represented in type 
'int'
Fixes: 
15415/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5712074128228352

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/ilbcdec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbcdec.c
index bba83a5896..a82a27525c 100644
--- a/libavcodec/ilbcdec.c
+++ b/libavcodec/ilbcdec.c
@@ -724,7 +724,7 @@ static void construct_vector (
 int16_t cbvec0[SUBL];
 int16_t cbvec1[SUBL];
 int16_t cbvec2[SUBL];
-int32_t a32;
+unsigned a32;
 int16_t *gainPtr;
 int j;
 
@@ -745,9 +745,9 @@ static void construct_vector (
 for (j = 0; j < veclen; j++) {
 a32 = SPL_MUL_16_16(*gainPtr++, cbvec0[j]);
 a32 += SPL_MUL_16_16(*gainPtr++, cbvec1[j]);
-a32 += (unsigned)SPL_MUL_16_16(*gainPtr, cbvec2[j]);
+a32 += SPL_MUL_16_16(*gainPtr, cbvec2[j]);
 gainPtr -= 2;
-decvector[j] = (a32 + 8192) >> 14;
+decvector[j] = (int)(a32 + 8192) >> 14;
 }
 }
 
-- 
2.22.0

___
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".