GNU nano - Bugs: bug #59419, linter can place cursor beyond...
You are not allowed to post comments on this tracker with your current authentication level.
bug #59419: linter can place cursor beyond EOL, leading to a segmentation fault upon typing
Submitter: | Ava McWhorter <megidont> | ||
Submitted: | Thu 05 Nov 2020 04:48:54 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Thu 03 Dec 2020 11:15:39 AM UTC, comment #3: |
Benno Schulenberg <bens> |
Fri 06 Nov 2020 10:01:11 AM UTC, comment #2: Fixed in git, commit 7f184ee2, by limiting 'current_x' to an index within the line. |
Benno Schulenberg <bens> |
Fri 06 Nov 2020 09:10:11 AM UTC, comment #1: Thank you for the detailed bug report. However, I do not have the 'jshint' program (nor can I find it among the software that Ubuntu offers), so I simulated it by adding at the end of my ~/.nanorc:
And created in the current directory a fake linter script:
Then I run 'nano nanoCrash.js' and type:
|
Benno Schulenberg <bens> |
Thu 05 Nov 2020 04:48:54 PM UTC, original submission:
Nano seems to place the cursor at the character location specified by a linter. However, many linters specify a location based on column number, with the assumption that a tab will increase the column number by a certain amount (usually greater than one). As a result, a linter returning an error at the end of a line that begins with tabs (for example, a javascript line lacking a semicolon within an indented block) will sometimes move the cursor out of bound, and any attempts to type lead to an immediate segmentation fault.
|
Ava McWhorter <megidont> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-12-03 | bens | Open/Closed | Open | Closed | |
2020-11-06 | bens | Status | In Progress | Fixed | |
2020-11-06 | bens | Severity | 3 - Normal | 4 - Important | |
Status | None | In Progress | |||
Assigned to | None | bens | |||
Summary | Linter can place cursor out of the boundaries of the line, leading to segmentation faults upon attempts to type | linter can place cursor beyond EOL, leading to a segmentation fault upon typing | |||
2020-11-05 | megidont | Attached File | - | Added js.nanorc, #50209 | |
Attached File | - | Added nanoCrash.js, #50210 | |||
Attached File | - | Added reporter.js, #50211 | |||
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-02a9.
Corresponding source code
Released in nano-5.4.