]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r301605:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 8 Jul 2016 20:39:37 +0000 (20:39 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 8 Jul 2016 20:39:37 +0000 (20:39 +0000)
commit690b22011d3ce0f3f191a7e9842e81f87f641057
tree9278e9b36e625cd581d98e06fb357fea6f2e8ba4
parent4d1603db02f967c705022f2c70efefdba6304285
MFC r301605:

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.

CID: 1007567

git-svn-id: svn://svn.freebsd.org/base/stable/10@302453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/rpcbind/rpcb_stat.c