We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0fa8842 + 21f1876 commit e3bea49Copy full SHA for e3bea49
1 file changed
iop/system/iomanx/src/iomanX.c
@@ -979,7 +979,7 @@ static iomanX_iop_file_t *new_iob(void)
979
980
static iomanX_iop_file_t *get_iob(int fd)
981
{
982
- if ( ((unsigned int)fd >= (sizeof(file_table) / sizeof(file_table[0]))) || (!file_table[fd].device) )
+ if ( (fd < 0) || ((unsigned int)fd >= (sizeof(file_table) / sizeof(file_table[0]))) || (!file_table[fd].device) )
983
return NULL;
984
return &file_table[fd];
985
}
0 commit comments