aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-09-14 00:26:50 +0000
committerMatt Kraai <kraai@debian.org>2000-09-14 00:26:50 +0000
commitcbbe4d6bc2da9c370b813649ca7474641bbddbf2 (patch)
tree50708041795d80ed08777e7a2a59b9560c0b3e85
parent56a328810b86bdc9014923a8fb0874be98795aef (diff)
downloadbusybox-w32-cbbe4d6bc2da9c370b813649ca7474641bbddbf2.tar.gz
busybox-w32-cbbe4d6bc2da9c370b813649ca7474641bbddbf2.tar.bz2
busybox-w32-cbbe4d6bc2da9c370b813649ca7474641bbddbf2.zip
Copy the string terminator.
-rw-r--r--lash.c2
-rw-r--r--sh.c2
-rw-r--r--shell/lash.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/lash.c b/lash.c
index cd27e468b..b4b11fb89 100644
--- a/lash.c
+++ b/lash.c
@@ -1071,7 +1071,7 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
1071 1071
1072 /* Now paste into the *commandPtr all the stuff 1072 /* Now paste into the *commandPtr all the stuff
1073 * leftover after the second backtick */ 1073 * leftover after the second backtick */
1074 memcpy(src, charptr2, strlen(charptr2)); 1074 memcpy(src, charptr2, strlen(charptr2)+1);
1075 free(charptr2); 1075 free(charptr2);
1076 1076
1077 /* Now recursively call parseCommand to deal with the new 1077 /* Now recursively call parseCommand to deal with the new
diff --git a/sh.c b/sh.c
index cd27e468b..b4b11fb89 100644
--- a/sh.c
+++ b/sh.c
@@ -1071,7 +1071,7 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
1071 1071
1072 /* Now paste into the *commandPtr all the stuff 1072 /* Now paste into the *commandPtr all the stuff
1073 * leftover after the second backtick */ 1073 * leftover after the second backtick */
1074 memcpy(src, charptr2, strlen(charptr2)); 1074 memcpy(src, charptr2, strlen(charptr2)+1);
1075 free(charptr2); 1075 free(charptr2);
1076 1076
1077 /* Now recursively call parseCommand to deal with the new 1077 /* 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
1071 1071
1072 /* Now paste into the *commandPtr all the stuff 1072 /* Now paste into the *commandPtr all the stuff
1073 * leftover after the second backtick */ 1073 * leftover after the second backtick */
1074 memcpy(src, charptr2, strlen(charptr2)); 1074 memcpy(src, charptr2, strlen(charptr2)+1);
1075 free(charptr2); 1075 free(charptr2);
1076 1076
1077 /* Now recursively call parseCommand to deal with the new 1077 /* Now recursively call parseCommand to deal with the new