Copy the string terminator.
This commit is contained in:
1 parent
56a328810b
commit
cbbe4d6bc2
3 files changed
+3
-3
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user