ETHER: Fix potential unterminated string (COVERITY)
This commit is contained in:
parent
c94659571f
commit
2d5711961f
1 changed files with 1 additions and 1 deletions
|
@ -419,7 +419,7 @@ t_stat eth_mac_scan_ex (ETH_MAC* mac, const char* strmac, UNIT *uptr)
|
||||||
strncpy (state.sim, sim_name, sizeof(state.sim));
|
strncpy (state.sim, sim_name, sizeof(state.sim));
|
||||||
getcwd (state.cwd, sizeof(state.cwd));
|
getcwd (state.cwd, sizeof(state.cwd));
|
||||||
if (uptr)
|
if (uptr)
|
||||||
strncpy (state.uname, sim_uname (uptr), sizeof(state.uname));
|
strncpy (state.uname, sim_uname (uptr), sizeof(state.uname)-1);
|
||||||
cptr = strchr (strmac, '>');
|
cptr = strchr (strmac, '>');
|
||||||
if (cptr) {
|
if (cptr) {
|
||||||
state.file[sizeof(state.file)-1] = '\0';
|
state.file[sizeof(state.file)-1] = '\0';
|
||||||
|
|
Loading…
Add table
Reference in a new issue