projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0840b76
)
revert 10881, and refix by changing "if (vallen)" to "if (val)". this
author
Paul Fox
<pgf@brightstareng.com>
Thu, 21 Jul 2005 12:03:05 +0000
(12:03 -0000)
committer
Paul Fox
<pgf@brightstareng.com>
Thu, 21 Jul 2005 12:03:05 +0000
(12:03 -0000)
is per the upstream fix for dash, in dash_0.5.2-6.diff. thanks vodz, for
catching this.
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 8656c0219441c2991898a69410afe6d3ee0bfa45..78320493398a2bdd84cade3d8e1c2ab6547c31f6 100644
(file)
--- 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';