[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] updates, 1.3.9pre1 soon (Debian bug #325065)

From: David Lawrence Ramsey
Subject: Re: [Nano-devel] updates, 1.3.9pre1 soon (Debian bug #325065)
Date: Tue, 20 Sep 2005 02:33:23 -0400
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)

David Lawrence Ramsey wrote:

> Update: I still can't reproduce this,

Further update: I have been able to reproduce (and fix in CVS) a crash
with long, tabbed lines using a different file, but I don't have to be
in fullscreen mode to trigger it, so it might be this bug, or it might
not.  It's caused by display_string()'s not allocating enough space for
all displayed characters, again, so I've fixed it by having it always
allocate enough for COLS characters.  The same fix for 1.3.8 is in the
attached patch.  (Please let me know soon whether this fixes the bug, as
it's the only major item holding back 1.3.9pre1.)

> I don't believe it's related to the crash in 1.3.7, since that crash
> always occurred during the reallocation inside the null_at() at the
> end of display_string(), and it always originated in (IIRC)
> _glibc_malloc_consolidate(), not realloc().

Ignore this.  I was mixing up gdb's error messages with glibc's.

diff -ur nano-1.3.8/src/winio.c nano-1.3.8-fixed/src/winio.c
--- nano-1.3.8/src/winio.c      2005-06-30 12:18:35.000000000 -0400
+++ nano-1.3.8-fixed/src/winio.c        2005-09-20 00:26:23.000000000 -0400
@@ -2283,9 +2283,8 @@
     assert(column <= start_col);
-    /* Allocate enough space for the entire line, accounting for a
-     * trailing multibyte character and/or tab. */
-    alloc_len = (mb_cur_max() * (len + 1)) + tabsize;
+    /* Allocate enough space for the entire line. */
+    alloc_len = (mb_cur_max() * COLS);
     converted = charalloc(alloc_len + 1);
     index = 0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]