bugGNU nano - Bugs: bug #56117, crash when doing a full-justify on...

 
 

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

bug #56117: crash when doing a full-justify on a file with a blank first line

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 11 Apr 2019 12:59:19 PM UTC  
 
Severity:  5 - Blocker Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Thu 11 Apr 2019 02:18:34 PM UTC, comment #1: 

Fixed in git, commit d83a8eb3.

The offending commit was ac8bd2a2.  It mistakenly removed the '- first_par_line->lineno'.  But not all files start with text on the first line.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 11 Apr 2019 12:59:19 PM UTC, original submission:  

To reproduce, run:

  src/nano --ignore README

Then type: M-J.  Result: crash.

The 'for (; jus_len > 1; jus_len--)' steps on and on through the lines without checking whether there is a next line.  And the preceding setting of 'jus_len' sets it the line number of the last line instead of to the difference of that line with the current line, meaning that the number is at least one too high.

Bug exists since version 4.0.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-16 bens Open/ClosedOpen => Closed
    2019-04-11 bens StatusIn Progress => Fixed
        Summarynano crashes when doing a full-justify => crash when doing a full-justify on a file with a blank first line

    Back to the top


    Powered by Savane 3.5