mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
Fix compiler identified array bounds issues
This commit is contained in:
@@ -569,7 +569,8 @@ char* eth_getname(int number, char* name)
|
||||
ETH_LIST list[ETH_MAX_DEVICE];
|
||||
int count = eth_devices(ETH_MAX_DEVICE, list);
|
||||
|
||||
if (count <= number) return NULL;
|
||||
if ((number < 0) || (count <= number))
|
||||
return NULL;
|
||||
strcpy(name, list[number].name);
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user