Copy the string terminator.
diff --git a/lash.c b/lash.c
index cd27e46..b4b11fb 100644
--- a/lash.c
+++ b/lash.c
@@ -1071,7 +1071,7 @@
/* 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/sh.c b/sh.c
index cd27e46..b4b11fb 100644
--- a/sh.c
+++ b/sh.c
@@ -1071,7 +1071,7 @@
/* 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 cd27e46..b4b11fb 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1071,7 +1071,7 @@
/* 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