Descriptioncgo: restrict #cgo directives to prevent shell expansion
Fixes issue #1879.
Directives were not directly expanded, but since their
content ended up in makefiles, further expansion would
take place there. This prevents such artifacts by
restricting the set of characters that may be used in
a directive value.
To build the list of safe characters I went through the
contents of /usr/lib/pkgconfig and extracted LDFLAGS
and CFLAGS information, so hopefully this is a
reasonable default to get started.
Patch Set 1 #Patch Set 2 : code review 4532092: cgo: restrict #cgo directives to prevent shell expansion #Patch Set 3 : code review 4532092: cgo: restrict #cgo directives to prevent shell expansion #Patch Set 4 : diff -r 01b6a240e0b7 https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 01b6a240e0b7 https://go.googlecode.com/hg/ #Patch Set 6 : diff -r c843ae19e7c2 https://go.googlecode.com/hg/ #MessagesTotal messages: 3
|