Closed natecook1000 closed 1 year ago
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.
limitedBy:
Fixes rdar://105154010
@swift-ci Please test
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