6849693: index of fdTable should be less than num. of fdTable in jdk7

Reviewed-by: alanb
This commit is contained in:
Chris Hegarty 2011-02-24 13:42:10 +00:00
parent 9607630405
commit 60bf44dc75

View File

@ -112,7 +112,7 @@ static void __attribute((constructor)) init() {
*/
static inline fdEntry_t *getFdEntry(int fd)
{
if (fd < 0 || fd > fdCount) {
if (fd < 0 || fd >= fdCount) {
return NULL;
}
return &fdTable[fd];