projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
e826743
)
Merge branch '2021-05-13/stat-fix-integer-overflow' of https://github.com/flx42/fio
author
Jens Axboe
<axboe@kernel.dk>
Fri, 14 May 2021 15:36:59 +0000
(09:36 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 14 May 2021 15:36:59 +0000
(09:36 -0600)
* '2021-05-13/stat-fix-integer-overflow' of https://github.com/flx42/fio:
stat: fix integer overflow in convert_agg_kbytes_percent
stat.c
patch
|
blob
|
blame
|
history
diff --git
a/stat.c
b/stat.c
index b7222f465f63a4c785ce080f523c89e2ec6c91f1..a8a96c85a4120b0d70dee939c9102fe340565aae 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-462,7
+462,7
@@
static double convert_agg_kbytes_percent(struct group_run_stats *rs, int ddir, i
{
double p_of_agg = 100.0;
if (rs && rs->agg[ddir] > 1024) {
- p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024.0);
+ p_of_agg = mean * 100
.0
/ (double) (rs->agg[ddir] / 1024.0);
if (p_of_agg > 100.0)
p_of_agg = 100.0;