summaryrefslogtreecommitdiff
path: root/libutils/FileMap_test.cpp
diff options
context:
space:
mode:
authorAlessio Balsini <balsini@google.com>2020-04-30 20:48:48 +0100
committerAlessio Balsini <balsini@google.com>2020-05-01 12:21:08 +0100
commit2612f9b1167e7c65f6d4015dee0b380cd91c4dc9 (patch)
tree992658301449dc5f2905d84c2fa6494bd4b74e5c /libutils/FileMap_test.cpp
parenteb3f92f1bad275dcd07d10058ee7834cfd4c6ff7 (diff)
snapshot_test: Fix overflow in statvfs arithmetics
Operations on (unsigned long) f_bsize and f_bfree are correctly handled on 64 bit architectures, but when switching to 32 bit, the multiplication between the two could result in an overflow, causing the test to crash. Fix by using a uint64_t operand, hinting the compiler to handle the whole multiplication with 64 bit operands. Bug: 154355449 Bug: 148889015 Test: vts_libsnapshot_test (32 bit) Signed-off-by: Alessio Balsini <balsini@google.com> Change-Id: Ief5c03ff7954c4a3e8597ef6e7df467f59428877 Merged-In: Ief5c03ff7954c4a3e8597ef6e7df467f59428877
Diffstat (limited to 'libutils/FileMap_test.cpp')
0 files changed, 0 insertions, 0 deletions