Skip to content

Conversation

natecook1000
Copy link
Member

Cherry-picked from #631.

When searching for a substring that doesn't exist, it was possible for TwoWaySearcher to advance beyond the end of the search string, causing a crash. This change adds a limitedBy: parameter to that index movement, avoiding the invalid movement.

Fixes rdar://105154010

When searching for a substring that doesn't exist, it was possible
for TwoWaySearcher to advance beyond the end of the search string,
causing a crash. This change adds a `limitedBy:` parameter to that
index movement, avoiding the invalid movement.

Fixes rdar://105154010
@natecook1000
Copy link
Member Author

@swift-ci Please test

…rkaround

Add type annotations in RegexBuilder tests
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 197ed6c into swiftlang:swift/main Feb 8, 2023
@natecook1000 natecook1000 deleted the swift_main_firstrange branch February 8, 2023 18:44
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.

1 participant