bugGNU nano - Bugs: bug #48108, segmentation fault when cutting...

 
 

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

bug #48108: segmentation fault when cutting stuff after undoing the line with the mark

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 03 Jun 2016 08:08:53 AM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 08 Jun 2016 08:04:25 AM UTC, comment #1: 

Fixed in git, ccffc54.

The bug was old, since at least nano-2.2.1.

Benno Schulenberg <bens>
Group administrator
Fri 03 Jun 2016 08:08:53 AM UTC, original submission:  

To reproduce, run 'nano --ignore +35 README'.  Then type:

<Enter>  M-A  M-U  ^K

Segmentation fault.

The M-U undoes the line where the mark was set.  As a result, nano highlights things as if the mark is at the start of the file (or elsewhere -- it depends on your version of nano, on terminal size, on... what not), but in fact the mark is nowhere, it refers to data that has been freed, so when you try to cut the marked region...  Boom.

Expected behavior: don't know.  Probably any undo should unset the mark?  Or at least when the line that contains the mark is affected by an undo, but that is probably umständlich to check.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-06-08 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code