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

 
 

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

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 03 Jun 2016 08:08:53 AM UTC  
 
Severity: 4 - ImportantStatus: 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.

 

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>
Project AdministratorIn charge of this item.
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>
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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 10:16:06 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 08 Jun 2016 08:04:25 AM UTCbensStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1