aboutsummaryrefslogtreecommitdiff
path: root/lib/libpathconv/tests/(public-mirror)
diff options
context:
space:
mode:
authorYunheeee <yunhe27@126.com>2026-09-26 03:10:04 +0000
committerXin LI <delphij@FreeBSD.org>2026-09-26 03:10:04 +0000
commit269002da453895fc935101afefeb02d2c7d10360 (patch)
tree42cc97a525c9cdf82542f831d0720759cfa34a44 /lib/libpathconv/tests/(public-mirror)
parent10bd16d4e8279b0089f74caa457a849be77fc306 (diff)
fsck_msdosfs: fix head bitmap over-allocation on 32-bit platformsHEADmain
bitmap_ctor() computed the allocation size as roundup2(bits, LONG_BIT) / (LONG_BIT / 8) The dividend is a count of bits, so converting it to bytes requires dividing by 8 (bits per byte), not by LONG_BIT / 8 (bytes per long). The two divisors happen to coincide on LP64, but on ILP32 platforms the head bitmap was allocated at twice the required size; for a FAT32 file system with close to 2^28 clusters, that is 64 MiB instead of 32 MiB. The extra half of the allocation was never accessed, so there is no functional change other than the reduced memory footprint. MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2440
Diffstat (limited to 'lib/libpathconv/tests/(public-mirror)')
0 files changed, 0 insertions, 0 deletions