From: Matt Kraai Date: Thu, 14 Sep 2000 00:26:50 +0000 (-0000) Subject: Copy the string terminator. X-Git-Tag: 0_47~79 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cbbe4d6bc2da9c370b813649ca7474641bbddbf2;p=oweals%2Fbusybox.git Copy the string terminator. --- 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 /* 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 cd27e468b..b4b11fb89 100644 --- a/sh.c +++ b/sh.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 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