aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/driver/driver.go
diff options
context:
space:
mode:
authorAnton Gyllenberg <anton@iki.fi>2018-10-02 22:47:28 +0000
committerBryan C. Mills <bcmills@google.com>2018-10-03 13:57:04 +0000
commit54f5a6674a9463fecb8656c9ffc6d80374c5868d (patch)
tree763b43ba56b0bd9f579d44d61b03dfb6116f71ec /src/database/sql/driver/driver.go
parenta3a69afff85c94be8b6419b03efd5dc14f2425f9 (diff)
downloadgo-54f5a6674a9463fecb8656c9ffc6d80374c5868d.tar.xz
cmd/go: prevent infinite loop in QueryPackage()
p = path.Dir(p) converges to either "." or "/". The current implementation of modload.QueryPackage() has a loop that terminates only on ".", not "/". This leads to the go command hanging in an infinite loop if the user manages to supply a file path starting with "/" as package path. An example of the issue is if the user (incorrectly) attempts to use an absolute directory path in an import statement within a module (import "/home/bob/myproj") and then runs go list. Fixes #27558 Change-Id: Iaa6a4f7b05eba30609373636e50224ae2e7d6158 GitHub-Last-Rev: 3a70d3a4277395c2dd8bb50f61b1ac3e44caee28 GitHub-Pull-Request: golang/go#27976 Reviewed-on: https://go-review.googlesource.com/c/139098 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/database/sql/driver/driver.go')
0 files changed, 0 insertions, 0 deletions