Permalink
Browse files

memtest.c: integer overflow fixed.

  • Loading branch information...
1 parent d8769ed commit 6375e5dc0ec1d09740f3a4c6173e3a1b20755388 @antirez committed Apr 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/memtest.c
View
@@ -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);

0 comments on commit 6375e5d

Please sign in to comment.