Repository navigation
completion: Validate cursor position - #6761
Merged
Merged
Conversation
swick
reviewed
Aug 27, 2026
| EOF | ||
|
|
||
| ok "complete list --columns=arch," | ||
|
|
Collaborator
There was a problem hiding this comment.
There is a useless whitespace change here and the commit message is not wrapper. You can easily avoid this entirely class of issues by configuring your agent and then actually checking the diff.
Contributor
Author
There was a problem hiding this comment.
No, it's my formatter in vscode, I usually have a trim whitespace plugin active and this file has a lot of lines, that have spaces at the end.
So I had to revert every automatic change manually and probably missed the line change here
|
|
||
| /* Ensure we're not going oob if we got weird arguments. */ | ||
| _point = MIN (_point, strlen (arg_line)); | ||
| point = MIN ((gsize) point, strlen (arg_line)); |
razzeee
force-pushed
the
completion-papercuts
branch
from
August 27, 2026 20:23
10dd536 to
b657441
Compare
Parse the cursor as a long before narrowing it to the completion structure's integer field. This lets malformed, negative, and overflowing positions fail before they can index outside the command-line buffer, while preserving the existing behavior of clamping positive positions beyond the line length.
razzeee
force-pushed
the
completion-papercuts
branch
from
August 27, 2026 20:24
b657441 to
0649885
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parse the cursor as a long before narrowing it to the completion structure's integer field. This lets malformed, negative, and overflowing positions fail before they can index outside the command-line buffer, while preserving the existing behavior of clamping positive positions beyond the line length.