bugGNU nano - Bugs: bug #49920, nano can crash when trying to undo...

 
 

bug #49920: nano can crash when trying to undo a change made by the formatter

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 23 Dec 2016 04:34:18 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.

 

Sat 24 Dec 2016 11:26:38 AM UTC, comment #1:

Fixed in git, d21a9c8f.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 23 Dec 2016 04:34:18 PM UTC, original submission:

To reproduce, create a file called 'sedder.sh' with the following content:

#!/bin/sh
sleep 1;
sed -i 's/kwikker/KSMS/' $1

Make it executable, and add this line to your ~/.nanorc:
extendsyntax c formatter /path/to/sedder.sh

Now run 'nano nono.c' and type the word kwikker, then type ^T. The word gets replaced with KSMS. Good. Now type M-U. Nano crashes:

nano is out of memory!
Buffer written to nono.c.save

Solution: when the formatter is run, the entire undo stack should be discarded because essentially we are in a new file: it cannot be guaranteed that the stored lines and locations still exist.

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Dec 2016 08:10:28 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 24 Dec 2016 11:26:38 AM UTCbensStatusIn Progress=>Fixed
    Sat 24 Dec 2016 10:21:47 AM UTCbensStatusNone=>In Progress
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1