diff options
author | ngie <ngie@FreeBSD.org> | 2016-06-08 12:45:22 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-06-08 12:45:22 +0000 |
commit | bc20c2f0f0d04fe4d35bbfeca934ff9460b8b069 (patch) | |
tree | c2ea5bd2ce5b38be0d4d02100e57cd8793603294 /lib/libc/stdlib/div.c | |
parent | 6b7c88e2f7e6ad0817f58db681857f0222fa3db4 (diff) | |
download | FreeBSD-src-bc20c2f0f0d04fe4d35bbfeca934ff9460b8b069.zip FreeBSD-src-bc20c2f0f0d04fe4d35bbfeca934ff9460b8b069.tar.gz |
Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT
Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as
it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x:
> include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
The proposed change also matches the rest of the rtype upper bound checks in the
file, so the original change was likely a typo.
MFC after: 2 weeks
Reported by: Coverity
CID: 1007567
Reviewed by: truckman
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/stdlib/div.c')
0 files changed, 0 insertions, 0 deletions