]> git.saurik.com Git - redis.git/commitdiff
memtest.c: integer overflow fixed.
authorantirez <antirez@gmail.com>
Thu, 12 Apr 2012 09:49:52 +0000 (11:49 +0200)
committerantirez <antirez@gmail.com>
Fri, 13 Apr 2012 14:12:28 +0000 (16:12 +0200)
src/memtest.c

index c8b47d489a34b72234a79ea678f539c7c3280bf3..09b4d831b1e579fa848af0887b1c7d013a04a16a 100644 (file)
@@ -47,7 +47,7 @@ void memtest_progress_end(void) {
 }
 
 void memtest_progress_step(size_t curr, size_t size, char c) {
-    size_t chars = (curr*progress_full)/size, j;
+    size_t chars = ((unsigned long long)curr*progress_full)/size, j;
 
     for (j = 0; j < chars-progress_printed; j++) {
         printf("%c",c);