about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/params.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ff802b874..d4c27f50d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-18  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 34008: Src/params.c: also metafy anything arriving from the
+	environment.
+
 	* 34006: Src/params.c: unmetafy anything put into the
 	environment.
 
diff --git a/Src/params.c b/Src/params.c
index b87598a02..1c51afd7a 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -641,7 +641,7 @@ split_env_string(char *env, char **name, char **value)
     if (!env || !name || !value)
 	return 0;
 
-    tenv = strcpy(zhalloc(strlen(env) + 1), env);
+    tenv = metafy(env, strlen(env), META_HEAPDUP);
     for (str = tenv; *str && *str != '='; str++)
 	;
     if (str != tenv && *str == '=') {