summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2015-03-11 08:55:50 -0700
committerPaul Pluzhnikov <ppluzhnikov@google.com>2015-03-11 08:55:50 -0700
commita2d4cf72c0ab07d4e58b42c01ac3ed2b95ca8d9b (patch)
tree92c0cf1d3efc57a2a703a1635d1fbcf969dc3f4b
parent5ca10a0c9ad1edb3b2e2e59ac6dccdd879cf84ae (diff)
downloadglibc-a2d4cf72c0ab07d4e58b42c01ac3ed2b95ca8d9b.tar.gz
glibc-a2d4cf72c0ab07d4e58b42c01ac3ed2b95ca8d9b.tar.xz
glibc-a2d4cf72c0ab07d4e58b42c01ac3ed2b95ca8d9b.zip
Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).
-rw-r--r--ChangeLog5
-rw-r--r--posix/wordexp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 10410dcfd5..736007961f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	[BZ #18043]
+	* posix/wordexp.c (parse_param): Don't call setenv(..., NULL, 1).
+
 2015-03-11  Adhemerval Zanellla  <azanella@linux.vnet.ibm.com>
 
 	* config.h.in [HAVE_ASM_GLOBAL_DOT_NAME]: Remove define.
diff --git a/posix/wordexp.c b/posix/wordexp.c
index f470e083ef..f6062d58c8 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -1915,7 +1915,7 @@ envsubst:
 	  if (pattern && !value)
 	    goto no_space;
 
-	  __setenv (env, value, 1);
+	  __setenv (env, value ?: "", 1);
 	  break;
 
 	default: