From cc415956a45cd17ab74aae3bb7465953c387d458 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 23 Mar 2012 05:21:10 +0100 Subject: [PATCH] error_conceal: fix FPE in guess_dc() with huge sizes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavcodec/error_resilience.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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