Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Wed, 11 Mar 2015 15:55:50 +0000 (08:55 -0700)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Wed, 11 Mar 2015 15:55:50 +0000 (08:55 -0700)
ChangeLog
posix/wordexp.c

index 10410dcfd5fa7a5cae82df16279725d3cf87e65e..736007961fc207f03175decec5750cd548562c18 100644 (file)
--- 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.
index f470e083efac1835e3ccbab00e3ca889ad14138b..f6062d58c815cd10bff26e8afa7129b7d04189f4 100644 (file)
@@ -1915,7 +1915,7 @@ envsubst:
          if (pattern && !value)
            goto no_space;
 
-         __setenv (env, value, 1);
+         __setenv (env, value ?: "", 1);
          break;
 
        default: