bugGNU nano - Bugs: bug #45718, nano crashes when typing “ or...

 
 

bug #45718: nano crashes when typing “ or ” as second character

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Fri 07 Aug 2015 08:27:12 PM 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.

 

Sat 08 Aug 2015 08:22:36 AM UTC, comment #2:

Fixed (or better: avoided) in SVN, r5347.

I don't understand why the reallocation in null_at() does not work in this case, and why only for characters that are three or more bytes in length. But it somehow messes things up, because the subsequent free(buf_mb) gets aborted.

So, simply put in the null byte manually -- when using UTF-8 there will be room enough to put it there without any need to reallocate.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 07 Aug 2015 08:45:16 PM UTC, comment #1:

It's not just those curly double quotation marks that trigger the crash, it is any Unicode code point that is U+0800 or higher.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 07 Aug 2015 08:27:12 PM UTC, original submission:

First do 'export MALLOC_CHECK_=2'. Then start 'nano --ignore', type O and then type or paste “ or ”. Nano is aborted.

It is the first null_at() in src/winio.c that causes this, but I don't understand why.

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
    Mon 07 Dec 2015 03:16:37 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 08 Aug 2015 08:22:36 AM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1