summaryrefslogtreecommitdiff
path: root/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'sh.c')
-rw-r--r--sh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh.c b/sh.c
index 8edb783..1977d5f 100644
--- a/sh.c
+++ b/sh.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);