Fix lwpSleepFd()'s guard against unusable fd
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Oct 2011 15:11:18 +0000 (17:11 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2011 10:47:05 +0000 (11:47 +0100)
commit55e689fb319d6c8d00fb508ea31533d0af3f93d6
tree0b5ee1fe603b4c9cb777bf8ed6c548bba94b9f79
parent0b66d8e281d9c0d646c66cffe976ba19cd53f55f
Fix lwpSleepFd()'s guard against unusable fd

0 <= fd < FD_SETSIZE must hold, or else undefined behavior in FD_SET()
and buffer overrun in LwpFdwait[fd].  Check of upper bound off by one,
check of lower bound missing.
src/lib/lwp/sel.c