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

Michael Niedermayer git at videolan.org
Thu Oct 25 21:29:19 CEST 2012


ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 21:09:42 2012 +0200| [de4606a5b798f8905ab1a3e07f0375db34f5e69e] | committer: Michael Niedermayer

pp: avoid overflow in w*h

Fixes CID700580
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 3689ec3d28d76b7a67a5d3838870dfd25cd2daad)

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

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

 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 4b8184c..406af65 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