summaryrefslogtreecommitdiffstats
path: root/bin/sh/expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r--bin/sh/expand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 108a77c..aaa91ac 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -174,6 +174,7 @@ expandarg(union node *arg, struct arglist *arglist, int flag)
ifslastp = NULL;
argstr(arg->narg.text, flag);
if (arglist == NULL) {
+ STACKSTRNUL(expdest);
return; /* here document expanded */
}
STPUTC('\0', expdest);
OpenPOWER on IntegriCloud