Skip to content

[6.2][BlockList] Fix a crash if block is empty #80765

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

Conversation

cachemeifyoucan
Copy link
Contributor

Check if the root node is a mapping node before iterating. This fixes a
crash when the YAML file is not the expected format.

(cherry picked from commit 56778b7)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner April 11, 2025 17:21
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan changed the title [BlockList] Fix a crash if block is empty [6.2][BlockList] Fix a crash if block is empty Apr 11, 2025
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test linux platform

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

This is a very safe fix.

@cachemeifyoucan cachemeifyoucan merged commit bda6ada into swiftlang:release/6.2 Apr 14, 2025
5 checks passed
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.

2 participants