traefik / yaegi

Yaegi is Another Elegant Go Interpreter
https://pkg.go.dev/github.com/traefik/yaegi
Apache License 2.0
6.94k stars 343 forks source link

interp: add safeguards when searching for vendor root. #1522

Closed dennwc closed 1 year ago

dennwc commented 1 year ago

With certain yaegi configuration on Windows, the loop in previousRoot can be infinite, because it fails to recognize driver letters as root.

This change adds a few more safeguards: checks path prefix earlier and checks if filepath.Dir produces an empty path.