]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] os: avoid panic in Root when symlink references the root
authorDamien Neil <dneil@google.com>
Thu, 27 Mar 2025 23:22:38 +0000 (16:22 -0700)
committerCarlos Amedee <carlos@golang.org>
Thu, 3 Apr 2025 18:49:16 +0000 (11:49 -0700)
commitfa7217f74de31f949e386efea1713df195a91900
treee5eaae5c6f738bf8541a94f9a3e74b9f80691c6f
parent49860cf92a9a3ba434d2bc393faaefabe48d181e
[release-branch.go1.24] os: avoid panic in Root when symlink references the root

We would panic when opening a symlink ending in ..,
where the symlink references the root itself.

For #73081
Fixes #73082

Change-Id: I7dc3f041ca79df7942feec58c197fde6881ecae5
Reviewed-on: https://go-review.googlesource.com/c/go/+/661416
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit cfc784a152ebbc4fc0b8bf13c02e0f6eb9c980bd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/662315
src/os/root_openat.go
src/os/root_test.go