mirror of
https://github.com/simh/simh.git
synced 2026-03-01 01:30:30 +00:00
SCP: Avoid using strlcpy for overlapping string copy
This commit is contained in:
6
scp.c
6
scp.c
@@ -6504,8 +6504,10 @@ if (vdelt) {
|
||||
if (1) {
|
||||
char mode[] = S_xstr(SIM_VERSION_MODE);
|
||||
|
||||
if (NULL != strchr (mode, '\"')) /* Quoted String? */
|
||||
strlcpy (mode, mode + 1, strlen (mode) - 1);/* strip quotes */
|
||||
if (NULL != strchr (mode, '\"')) { /* Quoted String? */
|
||||
mode[strlen (mode) - 1] = '\0'; /* strip quotes */
|
||||
memmove (mode, mode + 1, strlen (mode));
|
||||
}
|
||||
fprintf (st, " %s", mode);
|
||||
setenv ("SIM_VERSION_MODE", mode, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user