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

Re: [Mutt] #2882: segfaults in uxterm with > 254 columns if there



#2882: segfaults in uxterm with > 254 columns if there are single byte
        8-bit characters in index_format

Comment (by Sertaç Ö. Yıldız):

 {{{
 After this changeset, mutt started to segfault with the attached mbox.

 | $ echo $COLUMNS
 | 180
 | $ cat ~/mutt-if.rc
 | set index_format="%Z%?X?§& ?│%[%d%b@%H]│%-20.20F%?M?╠%4M╠>&║%4c║?%s%>
 %?Y?%Y%?"
 | $ LANG=en_US.UTF-8 gdb ~/RPMBUILD/BUILD/mutt-1.5.16/mutt
 | Using host libthread_db library "/lib/libthread_db.so.1".
 | (gdb) run -R -F ~/mutt-if.rc -f =bug
 | Program received signal SIGSEGV, Segmentation fault.
 | 0x00b9d6f7 in memset () from /lib/libc.so.6
 | (gdb) bt
 | #0  0x00b9d6f7 in memset () from /lib/libc.so.6
 | #1  0x080b7f11 in mutt_FormatString (
 |     dest=0xbfdf1548 "    �\224\20206Sep@14�\224\202Halkla Ili�\237kiler
 Ofi�\225\2210.1K�\225\221[students]  Davetlisiniz 11 Eylül Salı - Film
 Sezonu Müzikle Ba�\237lıyor! Your're Invited 11 Sept Tuesday - Film Season
 Begins with Music!", ' ' <repeats 11 times>..., destlen=<value optimized
 out>, col=0, src=<value optimized out>,
 |     callback=0x8079d20 <hdr_format_str>, data=3219068092, flags=100) at
 /usr/include/bits/string3.h:96
 | #2  0x080798a0 in _mutt_make_string (
 |     dest=0xbfdf1548 "    �\224\20206Sep@14�\224\202Halkla Ili�\237kiler
 Ofi�\225\2210.1K�\225\221[students]  Davetlisiniz 11 Eylül Salı - Film
 Sezonu Müzikle Ba�\237lıyor! Your're Invited 11 Sept Tuesday - Film Season
 Begins with Music!", ' ' <repeats 11 times>..., destlen=256,
 |     s=0x82c27d0 "%Z%?X?§&
 
?�\224\202%[%d%b@%H]�\224\202%-20.20F%?M?�\225�%4M�\225�>&�\225\221%4c�\225\221?%s%>
 %?Y?%Y%?", ctx=0x82c2748, hdr=0x82cb940, flags=100)
 |     at hdrline.c:736
 | #3  0x0806a3ea in index_make_entry (
 |     s=0xbfdf1548 "    �\224\20206Sep@14�\224\202Halkla Ili�\237kiler
 Ofi�\225\2210.1K�\225\221[students]  Davetlisiniz 11 Eylül Salı - Film
 Sezonu Müzikle Ba�\237lıyor! Your're Invited 11 Sept Tuesday - Film Season
 Begins with Music!", ' ' <repeats 11 times>..., l=256, menu=0x82cc128,
 num=0) at curs_main.c:174
 | #4  0x080842b2 in menu_make_entry (
 |     s=0xbfdf1548 "    �\224\20206Sep@14�\224\202Halkla Ili�\237kiler
 Ofi�\225\2210.1K�\225\221[students]  Davetlisiniz 11 Eylül Salı - Film
 Sezonu Müzikle Ba�\237lıyor! Your're Invited 11 Sept Tuesday - Film Season
 Begins with Music!", ' ' <repeats 11 times>..., l=0, menu=0x82cc128,
 i=1073739135) at menu.c:154
 | #5  0x08085236 in menu_redraw_index (menu=0x82cc128) at menu.c:216
 | #6  0x20202020 in ?? ()
 | #7  0x20202020 in ?? ()
 | [snip]
 | #2669 0x20202020 in ?? ()
 | #2670 0x20202020 in ?? ()
 | Cannot access memory at address 0xbfdf4000

 After this line,
 | 1207    count -= wlen; /* how many byte left for this line's buffer */
 count becomes negative. Just before the memset(): count=-9 col=179
 wlen=189.
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2882#comment:>