aboutsummaryrefslogtreecommitdiff
path: root/lash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lash.c')
-rw-r--r--lash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lash.c b/lash.c
index a2969082f..cbaf16ef8 100644
--- a/lash.c
+++ b/lash.c
@@ -1023,7 +1023,8 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
/* Make some space to hold just the backticked command */
charptr1 = charptr2 = xmalloc(1+ptr-src);
- snprintf(charptr1, 1+ptr-src, src);
+ memcpy(charptr1, src, ptr-src);
+ charptr1[ptr-src] = '\0';
newJob = xmalloc(sizeof(struct job));
/* Now parse and run the backticked command */
if (!parseCommand(&charptr1, newJob, &njobList, inBg)