Re: [FFmpeg-devel] [PATCH 1/2] avcodec/takdec: Fix integer overflow in decode_subframe()

2017-07-28 Thread Michael Niedermayer
On Thu, Jul 27, 2017 at 11:49:26PM +0200, Michael Niedermayer wrote:
> Fixes: runtime error: signed integer overflow: -536870912 - 1972191120 cannot 
> be represented in type 'int'
> Fixes: 2711/clusterfuzz-testcase-minimized-4975142398590976
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/takdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

patchset applied

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

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


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


[FFmpeg-devel] [PATCH 1/2] avcodec/takdec: Fix integer overflow in decode_subframe()

2017-07-27 Thread Michael Niedermayer
Fixes: runtime error: signed integer overflow: -536870912 - 1972191120 cannot 
be represented in type 'int'
Fixes: 2711/clusterfuzz-testcase-minimized-4975142398590976

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

diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index e555482b23..1676313b7c 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -491,7 +491,7 @@ static int decode_subframe(TAKDecContext *s, int32_t 
*decoded,
  s->residues[i + j + 1] * s->filter[j + 1] +
  s->residues[i + j] * s->filter[j];
 }
-v = (av_clip_intp2(v >> filter_quant, 13) * (1 << dshift)) - 
*decoded;
+v = (av_clip_intp2(v >> filter_quant, 13) * (1 << dshift)) - 
(unsigned)*decoded;
 *decoded++ = v;
 s->residues[filter_order + i] = v >> dshift;
 }
-- 
2.13.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel