HomeFreeBSD

bspatch: add integer overflow checks

Description

bspatch: add integer overflow checks

Introduce a new add_off_t static function that exits with an error
message if there's an overflow, otherwise returns their sum. Use this
when adding values obtained from the input patch.

Reviewed by: delphij, allanjude (earlier)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7897

Details

Committed
emasteSep 26 2019, 1:27 PM
Reviewer
delphij
Differential Revision
D7897: bspatch: add integer overflow checks
Parents
rS352741: mpr/mps crash badly. Part of the stability added use of atomic64 functions not
Branches
Unknown
Tags
Unknown