Skip to content

Fix out of bound crash in lsp navto.#53495

Merged
CyrusNajmabadi merged 2 commits intodotnet:mainfrom
CyrusNajmabadi:navToCrash
May 18, 2021
Merged

Fix out of bound crash in lsp navto.#53495
CyrusNajmabadi merged 2 commits intodotnet:mainfrom
CyrusNajmabadi:navToCrash

Conversation

@CyrusNajmabadi
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi commented May 18, 2021

Fixes #53493

@CyrusNajmabadi CyrusNajmabadi requested a review from dibarbet May 18, 2021 20:03
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner May 18, 2021 20:03
@ghost ghost added the Area-IDE label May 18, 2021
// to.
span = TextSpan.FromBounds(
Math.Min(text.Length, span.Start),
Math.Min(text.Length, span.End));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

stale results are possible as of: #52380

Copy link
Member

Choose a reason for hiding this comment

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

Do we have the same clamping happening in the non-LSP implementation as well? Is there way to unify that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we do. i'll see if i can share the code somehow.

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge May 18, 2021 20:11
@CyrusNajmabadi CyrusNajmabadi merged commit cbd2a84 into dotnet:main May 18, 2021
@ghost ghost added this to the Next milestone May 18, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the navToCrash branch May 18, 2021 21:57
@RikkiGibson RikkiGibson modified the milestones: Next, 17.0.P2 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in OOP Navigate-To

4 participants