HomeFreeBSD

libdiff: Detect and recover from file truncation.

Description

libdiff: Detect and recover from file truncation.

If a memory-mapped file is truncated before we get to the end, the
atomizer may catch SIGBUS. Detect that, reduce the input length to
what we were actually able to read, and set a flag so the caller can
take further action (e.g. warn the user and / or start over).

Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D45217

Details

Provenance
desAuthored on May 20 2024, 1:26 PM
Reviewer
markj
Differential Revision
D45217: libdiff: Detect and recover from file truncation.
Parents
rG93fbfef0b503: if_vxlan(4): Add checking for loops and nesting of tunnels
Branches
Unknown
Tags
Unknown