projects
/
gc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f69091
)
Fix potential multiplication overflow in check_heap_stats (test)
author
Ivan Maidanski
<ivmai@mail.ru>
Fri, 12 Feb 2016 18:36:08 +0000
(21:36 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Fri, 12 Feb 2016 18:36:08 +0000
(21:36 +0300)
* tests/test.c (check_heap_stats): Cast n_tests to size_t before
multiplication by
2700000
(instead of implicit cast to size_t of the
result).
tests/test.c
patch
|
blob
|
history
diff --git
a/tests/test.c
b/tests/test.c
index a09c4ad50ebc0d0c00c0c92aa6168dc5cec02baa..6ae1b0588ad567a2754f2f3fd30088ea3e84d14d 100644
(file)
--- a/
tests/test.c
+++ b/
tests/test.c
@@
-1554,7
+1554,7
@@
void check_heap_stats(void)
(unsigned long)GC_get_memory_use());
GC_printf("Final heap size is %lu bytes\n",
(unsigned long)GC_get_heap_size());
- if (GC_get_total_bytes() < n_tests *
+ if (GC_get_total_bytes() <
(size_t)
n_tests *
# ifdef VERY_SMALL_CONFIG
2700000
# else