diff options
-rw-r--r-- | lash.c | 2 | ||||
-rw-r--r-- | sh.c | 2 | ||||
-rw-r--r-- | shell/lash.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -1071,7 +1071,7 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi /* Now paste into the *commandPtr all the stuff * leftover after the second backtick */ - memcpy(src, charptr2, strlen(charptr2)); + memcpy(src, charptr2, strlen(charptr2)+1); free(charptr2); /* Now recursively call parseCommand to deal with the new @@ -1071,7 +1071,7 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi /* Now paste into the *commandPtr all the stuff * leftover after the second backtick */ - memcpy(src, charptr2, strlen(charptr2)); + memcpy(src, charptr2, strlen(charptr2)+1); free(charptr2); /* Now recursively call parseCommand to deal with the new diff --git a/shell/lash.c b/shell/lash.c index cd27e468b..b4b11fb89 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -1071,7 +1071,7 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi /* Now paste into the *commandPtr all the stuff * leftover after the second backtick */ - memcpy(src, charptr2, strlen(charptr2)); + memcpy(src, charptr2, strlen(charptr2)+1); free(charptr2); /* Now recursively call parseCommand to deal with the new |