SERIAL: Fix potential buffer overrun. (COVERITY)
This commit is contained in:
parent
1cc845b26c
commit
75a2ced795
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ serial_open_devices[serial_open_device_count-1].port = port;
|
|||
serial_open_devices[serial_open_device_count-1].line = line;
|
||||
strncpy(serial_open_devices[serial_open_device_count-1].name, name, sizeof(serial_open_devices[serial_open_device_count-1].name)-1);
|
||||
if (config)
|
||||
strncpy(serial_open_devices[serial_open_device_count-1].config, config, sizeof(serial_open_devices[serial_open_device_count-1].config));
|
||||
strncpy(serial_open_devices[serial_open_device_count-1].config, config, sizeof(serial_open_devices[serial_open_device_count-1].config)-1);
|
||||
return &serial_open_devices[serial_open_device_count-1];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue