From 706ba9f8acf5caa6a1e1c1a27c69413c382ac133 Mon Sep 17 00:00:00 2001 From: enselic Date: Sun, 8 Nov 2009 18:32:44 +0000 Subject: Fix "uint_32_t truncation of cache compression statistics" Apply patch from Piotr Engelking that fix integer overflow issues for cache statistics. The patch is attached to this bug report: recordmydesktop: uint_32_t truncation of cache compression statistics http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549263 git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@601 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/rmd_cache_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'recordmydesktop/src') diff --git a/recordmydesktop/src/rmd_cache_frame.c b/recordmydesktop/src/rmd_cache_frame.c index 999d3c4..18ae934 100644 --- a/recordmydesktop/src/rmd_cache_frame.c +++ b/recordmydesktop/src/rmd_cache_frame.c @@ -271,7 +271,7 @@ void *rmdCacheImageBuffer(ProgData *pdata){ unsigned int bytes_per_pixel = pdata->specs.depth >= 24 ? 4 : 2; unsigned int pixels_per_frame = pdata->brwin.rrect.width * pdata->brwin.rrect.height; - total_received_bytes = ((unsigned int)frameno) * bytes_per_pixel * pixels_per_frame; + total_received_bytes = ((unsigned long long int)frameno) * bytes_per_pixel * pixels_per_frame; } if(total_received_bytes){ -- cgit v1.2.3