bugGNU nano - Bugs: bug #48792, do_prompt() assumes there are at...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48792: do_prompt() assumes there are at least 4 columns available

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 15 Aug 2016 07:31:46 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 25 Aug 2016 09:55:45 AM UTC, comment #2: 

Fixed in git, 5614743.

Benno Schulenberg <bens>
Group administrator
Mon 15 Aug 2016 07:59:32 PM UTC, comment #1: 

Sure, statusline() assumes at least four columns.  But the crash problem is in do_prompt().  Why on earth does it do "COLS - 4" there?  The prompt should be allowed to cover the entire width of the window -- minus maybe one or two characters, not four.

Benno Schulenberg <bens>
Group administrator
Mon 15 Aug 2016 07:31:46 PM UTC, original submission:  

To reproduce, make the terminal less than four columns wide, start nano, type ^O, and see how nano crashes.

The statusline() routine in src/winio.c does several times "COLS - n".  That will go wrong when COLS is smaller than 4.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-02 bens Open/ClosedOpen Closed
    2016-08-25 bens StatusNone Fixed
    2016-08-15 bens Summarystatusline() assumes there are at least 4 columns available do_prompt() assumes there are at least 4 columns available

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code