summaryrefslogtreecommitdiff
path: root/shell/lash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/lash.c')
-rw-r--r--shell/lash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/lash.c b/shell/lash.c
index 8edb783..1977d5f 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
return NULL;
}
- token = xmalloc(*index);
+ token = xmalloc(*index+1);
token[*index] = '\0';
strncpy(token, string, *index);