correct bounds check of fd parameter

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
Sam Leffler 2005-02-25 20:15:11 +00:00
parent 915a554b41
commit 3b30e64d22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142504

View File

@ -93,7 +93,7 @@ ibcs2_poll(td, uap)
&conv, sizeof(conv))) != 0)
return error;
conv.revents = 0;
if (conv.fd < 0 || conv.fd > FD_SETSIZE)
if (conv.fd < 0 || conv.fd >= FD_SETSIZE)
continue;
if (conv.fd >= nfds)
nfds = conv.fd + 1;