From c64554169171a41a7dfa7ef01c188e630a226702 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Sat, 22 Sep 2012 05:54:29 +1000 Subject: [PATCH] [release-branch.go1] syscall: fix plan9 build broken by CL 6458050 --- src/pkg/syscall/exec_plan9.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pkg/syscall/exec_plan9.go b/src/pkg/syscall/exec_plan9.go index 5be3c4a173..6a92d0bb60 100644 --- a/src/pkg/syscall/exec_plan9.go +++ b/src/pkg/syscall/exec_plan9.go @@ -420,11 +420,9 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) if err != nil { return 0, err } - envvalue, err := bytePtrFromString(v[i+1:]) - if err != nil { - return 0, err - } - envvParsed = append(envvParsed, envItem{envname, envvalue, len(v) - i}) + envvalue := make([]byte, len(v)-i) + copy(envvalue, v[i+1:]) + envvParsed = append(envvParsed, envItem{envname, &envvalue[0], len(v) - i}) } }