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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in git, 5614743.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 02 Sep 2016 07:37:58 AM UTCbensOpen/ClosedOpen=>Closed
    Thu 25 Aug 2016 09:55:45 AM UTCbensStatusNone=>Fixed
    Mon 15 Aug 2016 07:59:32 PM UTCbensSummarystatusline() 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.1-cleanup1