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

Guard for overflow of the column offset when applying edits #1952

Merged
merged 4 commits into from
Mar 23, 2022

Conversation

rwols
Copy link
Member

@rwols rwols commented Mar 17, 2022

We could also guard for overflow from the client side. This is all totally hypothetical and I haven't actually tried using LSP-Prisma yet.

Related: #1951

@jwortmann
Copy link
Member

The ST API seems to accept signed 64-bit integers with upper limit 2^63-1 for View.text_point_utf16, which should be sufficient to prevent the overflow error. If you want to limit the value to the uinteger data type from the LSP specs instead, it should be UINT_MAX = INT_MAX = 2**31 - 1.

@rwols rwols requested a review from predragnikolic March 19, 2022 15:02
Copy link
Member

@predragnikolic predragnikolic left a comment

Choose a reason for hiding this comment

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

I can confirm that the issue is fixed.

@rwols rwols merged commit a3c6a61 into main Mar 23, 2022
@rwols rwols deleted the fix/guard-for-overflow branch March 23, 2022 20:22
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.

3 participants