diff options
author | Jeff Gaston <jeffrygaston@google.com> | 2017-11-30 17:31:43 -0800 |
---|---|---|
committer | Jeff Gaston <jeffrygaston@google.com> | 2017-12-04 17:16:21 -0800 |
commit | f23e36690e1e76551535b9479e3285425331a862 (patch) | |
tree | a7c42932be39d4cf355370edcde9d0cb8e4302f5 /context.go | |
parent | 3c8c3346d2c3eef85ce99ab58bd8aa07a53d6bc1 (diff) | |
download | android_build_blueprint-f23e36690e1e76551535b9479e3285425331a862.tar.gz android_build_blueprint-f23e36690e1e76551535b9479e3285425331a862.tar.bz2 android_build_blueprint-f23e36690e1e76551535b9479e3285425331a862.zip |
Disallow bp 'build' includes to reference other dirs
Bug: 65683273
Test: add 'build = ["sub/nope.bp"]' to an Android.bp; notice the error
Change-Id: Ic0f171f283edda074f65a76029e660dfaab2504b
Diffstat (limited to 'context.go')
-rw-r--r-- | context.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -954,6 +954,14 @@ func (c *Context) parseOne(rootDir, filename string, reader io.Reader, if err != nil { errs = append(errs, err) } + for _, buildEntry := range build { + if strings.Contains(buildEntry, "/") { + errs = append(errs, &BlueprintError{ + Err: fmt.Errorf("illegal value %v. The '/' character is not permitted", buildEntry), + Pos: buildPos, + }) + } + } subBlueprintsName, _, err := getStringFromScope(scope, "subname") if err != nil { |