snapshot_test: Fix overflow in statvfs arithmetics am: 2612f9b116

Change-Id: Ifcb544bd30ee55d9d23b54b1e2a8c5f94f8ebb14
This commit is contained in:
Alessio Balsini 2020-05-01 13:06:49 +00:00 committed by Automerger Merge Worker
commit 0006be8a6c

View file

@ -212,8 +212,8 @@ AssertionResult LowSpaceUserdata::ReadUserdataStats() {
return AssertionFailure() << strerror(errno);
}
bsize_ = buf.f_bsize;
free_space_ = buf.f_bsize * buf.f_bfree;
available_space_ = buf.f_bsize * buf.f_bavail;
free_space_ = bsize_ * buf.f_bfree;
available_space_ = bsize_ * buf.f_bavail;
return AssertionSuccess();
}