<<< Date Index >>>     <<< Thread Index >>>

mutt/1536: Segment fault with long lines when LANG=*.UTF-8



The following reply was made to PR mutt/1536; it has been noted by GNATS.

From: Brendan Cully <brendan@xxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: mutt/1536: Segment fault with long lines when LANG=*.UTF-8
Date: Thu, 04 Aug 2005 19:42:37 -0700

 On Wednesday, 03 August 2005 at 08:25, Brendan Cully wrote:
 >  >  Yes, the segfault still appears with 1.5.9i (2005-03-13).
 >  >  
 >  >  The debian version (1.5.9-2) with the patch
 >  >  patch.helmersson.incomplete-mbyte.2 does not segfault.
 >  
 >  The patch seems reasonable to me, but I'm not too conversant in this
 >  multibyte stuff. Can anyone with more authority comment on why it
 >  shouldn't be committed?
 
 Looking at it a bit more closely I wonder if it could be done more
 efficiently. Is it possible to scan from the back of the buffer until
 mbrtowc returns n > 0, then trim the buffer to current_pos + n? Or am
 I missing some tricky multibyte issue? Seems a bit nicer than walking
 over every character of every line.