]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bspatch: add integer overflow checks
authorEd Maste <emaste@FreeBSD.org>
Thu, 26 Sep 2019 13:27:25 +0000 (13:27 +0000)
committerEd Maste <emaste@FreeBSD.org>
Thu, 26 Sep 2019 13:27:25 +0000 (13:27 +0000)
commit20bd59416dcacbd2b776fe49dfa193900f303287
treebf7223aa77fc47b9d9c197d31bb9489c8890cebf
parent11fc80a09824d8e3acce9775aff1e3b7c8a1f305
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
usr.bin/bsdiff/bspatch/bspatch.c