diff options
author | Paul Fox | 2005-07-21 12:03:05 +0000 |
---|---|---|
committer | Paul Fox | 2005-07-21 12:03:05 +0000 |
commit | 8de331def08568678fa09536b5589ea473bee6e6 (patch) | |
tree | b5f1accbe77c45fe27b54d48d5cf255a7bfc8cbd /shell | |
parent | 0840b76602900f8236f444b68da16d5c8d57ac3d (diff) | |
download | busybox-8de331def08568678fa09536b5589ea473bee6e6.zip busybox-8de331def08568678fa09536b5589ea473bee6e6.tar.gz |
revert 10881, and refix by changing "if (vallen)" to "if (val)". this
is per the upstream fix for dash, in dash_0.5.2-6.diff. thanks vodz, for
catching this.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8656c02..7832049 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -12001,8 +12001,9 @@ setvar(const char *name, const char *val, int flags) } INTOFF; p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen); - *p++ = '='; - if (vallen) { + *p++ = '\0'; + if (val) { + p[-1] = '='; p = mempcpy(p, val, vallen); } *p = '\0'; |