[FFmpeg-cvslog] pp: avoid overflow in w*h

Michael Niedermayer git at videolan.org
Sat Oct 13 21:18:33 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 21:09:42 2012 +0200| [3689ec3d28d76b7a67a5d3838870dfd25cd2daad] | committer: Michael Niedermayer

pp: avoid overflow in w*h

Fixes CID700580
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3689ec3d28d76b7a67a5d3838870dfd25cd2daad
---

 libpostproc/postprocess_template.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c
index e1a3977..e97c916 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];



More information about the ffmpeg-cvslog mailing list