From 3689ec3d28d76b7a67a5d3838870dfd25cd2daad Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Oct 2012 21:09:42 +0200 Subject: pp: avoid overflow in w*h Fixes CID700580 Signed-off-by: Michael Niedermayer --- libpostproc/postprocess_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpostproc/postprocess_template.c') diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c index e1a3977056..e97c91614d 100644 --- a/libpostproc/postprocess_template.c +++ b/libpostproc/postprocess_template.c @@ -3225,7 +3225,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ c.frameNum++; // first frame is fscked so we ignore it - if(c.frameNum == 1) yHistogram[0]= width*height/64*15/256; + if(c.frameNum == 1) yHistogram[0]= width*(uint64_t)height/64*15/256; for(i=0; i<256; i++){ sum+= yHistogram[i]; -- cgit v1.2.3