HomeFreeBSD

makefs: Cast daddr_t to off_t before multiplication

Description

makefs: Cast daddr_t to off_t before multiplication

Apparently some large-file systems out there, such as my powerpc64le
Linux box, define daddr_t as a 32-bit type, which is sad and stymies
cross-building disk images. Cast daddr_t to off_t before doing
arithmetic that overflows.

Reviewed by: arichardson, jrtc27, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27458

(cherry picked from commit 7ef082733bf8989797b71025ba6d597a7d17d92b)

Details

Provenance
nwf20_cl.cam.ac.ukAuthored on Jun 15 2021, 12:18 AM
jrtc27Committed on Sep 7 2021, 12:06 PM
Reviewer
arichardson
Differential Revision
D27458: makefs cast daddr_t to off_t before multiplication
Parents
rG4a6bf977ac3e: Fix cross-builds after 4e5d32a445f90d37966cd6de571978551654e3f3
Branches
Unknown
Tags
Unknown