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

bugfix: avoid index overrun in DL3045 #640

Merged
merged 1 commit into from May 14, 2021

Conversation

m-ildefons
Copy link
Collaborator

  • fix index overrun in DL3045 with single character paths when checking
    for windows type paths.

fixes: #638

| Char.isLetter (Text.index path 0) && (':' == Text.index path 1) = True
| Text.length path >= 2
&& Char.isLetter (Text.index path 0)
&& (':' == Text.index path 1) = True
Copy link
Member

Choose a reason for hiding this comment

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

Is there a version of that function that returns a maybe? We should use that instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not exactly, but uncons is close enough, since this is at the start of path.

- fix index overrun in DL3045 with single character paths when checking
  for windows type paths.

fixes: hadolint#638
@lorenzo lorenzo merged commit 144096b into hadolint:master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Index too large crash on Windows
2 participants