From: Michael Niedermayer Date: Fri, 23 Mar 2012 04:21:10 +0000 (+0100) Subject: error_conceal: fix FPE in guess_dc() with huge sizes. X-Git-Tag: android-x86-4.4-r1~12827 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cc415956a45cd17ab74aae3bb7465953c387d458;p=android-x86%2Fexternal-ffmpeg.git error_conceal: fix FPE in guess_dc() with huge sizes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 1c1420f93c..cd6aa01803 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -174,7 +174,7 @@ static void guess_dc(MpegEncContext *s, int16_t *dc, int w, { int b_x, b_y; int16_t (*col )[4] = av_malloc(stride*h*sizeof( int16_t)*4); - uint16_t (*dist)[4] = av_malloc(stride*h*sizeof(uint16_t)*4); + uint32_t (*dist)[4] = av_malloc(stride*h*sizeof(uint32_t)*4); for(b_y=0; b_y