HomeFreeBSD

sh: fix read builtin on 32-bit systems

Description

sh: fix read builtin on 32-bit systems

Specifically, any system with a 32-bit size_t; -residue is calculated as a
32-bit *then* promoted to the 64-bit off_t and the result is ultimately
wrong. This resulted in what would appear to be truncated output, as only
the first line would be read.

Correct it by just making residue an off_t to begin with, since this is what
lseek will take anyways.

Reported by: antoine, dim
Triaged by: cem
Tested by: kevans
X-MFC-With: r358152

Details

Provenance
kevansAuthored on
Parents
rS358234: powerpc/booke: Fix handling of pvh_global_lock and pmap lock
Branches
Unknown
Tags
Unknown