Copy the string terminator.

This commit is contained in:
Matt Kraai 2000-09-14 00:26:50 +00:00
parent 56a328810b
commit cbbe4d6bc2
3 changed files with 3 additions and 3 deletions

2
lash.c
View File

@ -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

2
sh.c
View File

@ -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

View File

@ -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