1
0
mirror of https://github.com/open-simh/simh.git synced 2026-03-05 11:04:49 +00:00

SCP: Fix possible memory corruption issue

This commit is contained in:
Peter Schorn
2023-04-07 09:17:46 +02:00
parent 374e3b8e71
commit e4ad37eccc

2
scp.c
View File

@@ -4339,7 +4339,7 @@ strlcpy (argline, cptr, arg_size);
cp = argline + (arg_size / 2);
strlcpy (cp, cptr, arg_size / 2);
argv[0] = argline; /* argv[0] points to unparsed arguments */
argv[argc + 1] = NULL; /* make sure the argument list always ends with a NULL */
argv[argc] = NULL; /* make sure the argument list always ends with a NULL */
while (*cp) {
while (sim_isspace (*cp)) /* skip blanks */
cp++;