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:
2
scp.c
2
scp.c
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user