diff options
author | pfg <pfg@FreeBSD.org> | 2014-12-16 21:13:55 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-12-16 21:13:55 +0000 |
commit | 7cc43d5ff85217e4aff8929e976bc2a175891fca (patch) | |
tree | 81f2eb8263c48b2958f82750aaa512405ef82c64 /usr.sbin/binmiscctl | |
parent | 8631101d5aaad1393a949c1725cee5710626c49f (diff) | |
download | FreeBSD-src-7cc43d5ff85217e4aff8929e976bc2a175891fca.zip FreeBSD-src-7cc43d5ff85217e4aff8929e976bc2a175891fca.tar.gz |
MFC r275553, r275612;
patch(1): Bring fixes from OpenBSD
Check fstat return value. Use off_t for file size and offsets.
Avoid iterating over end of string.
Introduce strtolinenum to properly check line numbers while parsing:
no signs, no spaces, just digits, 0 <= x <= LONG_MAX
Properly validate line ranges supplied in diff file to prevent overflows.
Also fixes an out of boundary memory access because the resulting values
are used as array indices.
PR: 195436
Obtained from: OpenBSD
Diffstat (limited to 'usr.sbin/binmiscctl')
0 files changed, 0 insertions, 0 deletions