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

 
 

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

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 07 Aug 2015 08:27:12 PM UTC
   
 
Severity:  4 - Important Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group administrator
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>
Group administrator
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>
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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-07 bens Open/ClosedOpen Closed
    2015-08-08 bens StatusNone Fixed
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code