projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3d338c
)
Fix previous commit.
author
Ondřej Bílka
<neleai@seznam.cz>
Mon, 10 Feb 2014 13:22:31 +0000
(14:22 +0100)
committer
Ondřej Bílka
<neleai@seznam.cz>
Mon, 10 Feb 2014 13:22:31 +0000
(14:22 +0100)
stdlib/setenv.c
patch
|
blob
|
history
diff --git
a/stdlib/setenv.c
b/stdlib/setenv.c
index
3043498
..
6b5f9be
100644
(file)
--- a/
stdlib/setenv.c
+++ b/
stdlib/setenv.c
@@
-146,6
+146,11
@@
__add_to_environ (name, value, combined, replace)
UNLOCK;
return -1;
}
+
+ if (__environ != last_environ)
+ memcpy ((char *) new_environ, (char *) __environ,
+ size * sizeof (char *));
+
new_environ[size] = NULL;
new_environ[size + 1] = NULL;
ep = new_environ + size;