go/src
Didier Spezia 8818cc8885 go/build: fix cgo ${SRCDIR} substitution when that variable contains spaces
When the source directory path contains spaces, cgo directives
cannot be properly validated:

$ pwd
/root/src/issue 11868

$ cat main.go
package main
//#cgo CFLAGS: -I${SRCDIR}/../../include
import "C"
func main() {
}

$ go build
can't load package: package issue 11868: /root/src/issue 11868/main.go:
 malformed #cgo argument: -I/root/src/issue 11868/../../include

Make sure spaces are tolerated in ${SRCDIR} when this variable
is expanded. This applies to ${SRCDIR} only. Shell safety
checks are still done in the same exact way for anything else.

Fixes #11868

Change-Id: I93d1d2b5ab167caa7ae353fe46fb8f69f1f06969
Reviewed-on: https://go-review.googlesource.com/16302
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-26 17:08:14 +00:00
..
archive archive/tar: make output deterministic 2015-11-13 02:02:32 +00:00
bufio bufio: fix scanning with a final empty token. 2015-09-25 21:46:13 +00:00
builtin
bytes
cmd internal/race: add package 2015-11-26 16:50:31 +00:00
compress compress: make Mark.Twain-Tom.Sawyer.txt licensed under non-free license free again 2015-11-24 21:50:01 +00:00
container
crypto crypto/tls: return a typed error on invalid record headers 2015-11-16 21:54:44 +00:00
database/sql database/sql: use RWMutex for driver registration 2015-10-23 04:33:50 +00:00
debug debug/elf: added MIPS ELF relocations 2015-11-12 04:50:32 +00:00
encoding encoding/xml: case-insensitive encoding recognition 2015-11-25 17:09:28 +00:00
errors
expvar
flag
fmt internal/race: add package 2015-11-26 16:50:31 +00:00
go go/build: fix cgo ${SRCDIR} substitution when that variable contains spaces 2015-11-26 17:08:14 +00:00
hash hash/crc32: add noescape tags to assembly functions 2015-11-25 15:01:10 +00:00
html text/template,html/template: correct comment in DefinedTemplates 2015-11-24 21:52:36 +00:00
image image: add NYCbCrA types. 2015-10-11 11:07:25 +00:00
index/suffixarray
internal internal/race: add package 2015-11-26 16:50:31 +00:00
io io: simplify documentation for ByteReader 2015-10-06 02:21:29 +00:00
log log/syslog: disable unix/unixgram tests on android 2015-10-21 17:56:51 +00:00
math math/rand: add a comment for the i=0 iteration 2015-11-15 08:21:29 +00:00
mime mime: Remove an allocation in word decoding. 2015-10-18 17:31:52 +00:00
net internal/race: add package 2015-11-26 16:50:31 +00:00
os os: use different test files on android 2015-11-20 16:37:21 +00:00
path path/filepath: in Rel use case-insensitive comparison on Windows 2015-11-17 23:48:47 +00:00
reflect reflect: mark mapassign as noescape 2015-11-19 21:35:58 +00:00
regexp regexp: fix one-pass compilation 2015-11-25 17:44:17 +00:00
runtime runtime: fix conflict resolution in golang.org/cl/14207 2015-11-25 01:32:55 +00:00
sort strings: fix period placement in Search doc comment 2015-11-18 02:58:10 +00:00
strconv strconv: slightly simplified roundShortest; better comments 2015-09-23 21:14:29 +00:00
strings strings: add asm version of Index() for short strings on amd64 2015-11-03 16:04:28 +00:00
sync internal/race: add package 2015-11-26 16:50:31 +00:00
syscall internal/race: add package 2015-11-26 16:50:31 +00:00
testing testing: pause the test timer while waiting in T.Parallel 2015-11-24 17:07:45 +00:00
text text/template,html/template: correct comment in DefinedTemplates 2015-11-24 21:52:36 +00:00
time time: _2006 is a literal _, followed by 2006 2015-11-18 00:06:39 +00:00
unicode unicode: add function level examples 2015-11-24 17:13:21 +00:00
unsafe
vendor/golang.org/x/net/http2/hpack net/http: update copy of http2 2015-10-21 00:28:55 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: set GOARM=7 2015-10-26 15:20:02 +00:00
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash
make.bat
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc