Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented Mar 11, 2023

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.

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.
Copy link
Member

@mvertes mvertes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvertes mvertes changed the title More safeguards when searching for vendor root. interp: add safeguards when searching for vendor root. Mar 13, 2023
@mvertes mvertes added bug Something isn't working area/core os/windows labels Mar 13, 2023
@mvertes mvertes added this to the v0.15.x milestone Mar 13, 2023
@traefiker traefiker merged commit 166fff7 into traefik:master Mar 13, 2023
@dennwc dennwc deleted the win_root branch August 30, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core bug Something isn't working os/windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants