diff --git a/VAX/vax610_sysdev.c b/VAX/vax610_sysdev.c index f7417ef1..eb40e8d3 100644 --- a/VAX/vax610_sysdev.c +++ b/VAX/vax610_sysdev.c @@ -371,7 +371,7 @@ if (r != SCPE_OK) { /* error? */ } return r; } -strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */ +strncpy (cpu_boot_cmd, ptr, CBUFSIZE-1); /* save for reboot */ return run_cmd (flag, "CPU"); } diff --git a/VAX/vax730_sys.c b/VAX/vax730_sys.c index b8ce8b6f..d3575d95 100644 --- a/VAX/vax730_sys.c +++ b/VAX/vax730_sys.c @@ -478,7 +478,7 @@ if (r != SCPE_OK) { /* error? */ } return r; } -strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */ +strncpy (cpu_boot_cmd, ptr, CBUFSIZE-1); /* save for reboot */ return run_cmd (flag, "CPU"); } diff --git a/VAX/vax750_cmi.c b/VAX/vax750_cmi.c index b547730d..7c9d27d5 100644 --- a/VAX/vax750_cmi.c +++ b/VAX/vax750_cmi.c @@ -617,7 +617,7 @@ if (r != SCPE_OK) { /* error? */ } return r; } -strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */ +strncpy (cpu_boot_cmd, ptr, CBUFSIZE-1); /* save for reboot */ return run_cmd (flag, "CPU"); } diff --git a/VAX/vax780_sbi.c b/VAX/vax780_sbi.c index 339a8a02..f5d3e6a5 100644 --- a/VAX/vax780_sbi.c +++ b/VAX/vax780_sbi.c @@ -630,7 +630,7 @@ if (r != SCPE_OK) { /* error? */ } return r; } -strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */ +strncpy (cpu_boot_cmd, ptr, CBUFSIZE-1); /* save for reboot */ return run_cmd (flag, "CPU"); } diff --git a/VAX/vax860_abus.c b/VAX/vax860_abus.c index af7519de..735d3601 100644 --- a/VAX/vax860_abus.c +++ b/VAX/vax860_abus.c @@ -693,7 +693,7 @@ if (r != SCPE_OK) { /* error? */ } return r; } -strncpy (cpu_boot_cmd, ptr, CBUFSIZE); /* save for reboot */ +strncpy (cpu_boot_cmd, ptr, CBUFSIZE-1); /* save for reboot */ return run_cmd (flag, "CPU"); }