#39 segfault on resize

open
Geoff Wing
None
5
2003-12-30
2003-12-17
Anonymous
No

rxvt sometimes segfaults on resizing operations, the
reasons seems to be that rxvt_scr_reset calls
rxvt_blank_screen_mem when adding rows.

However, rxvt_blank_screen_mem uses TemrWin.ncol, which
already contains the new (sometimes larger) value,
while the memory block is still smaller, resulting in
overwriting memory.

Setting TermWin.ncol to preV_ncol and restoring it in
the add rows branch fixes this.

<pcg@goof.com>

Discussion

  • Geoff Wing
    Geoff Wing
    2003-12-30

    Logged In: YES
    user_id=22709

    All calls to rxvt_blank_screen_mem() in rxvt_scr_reset() are
    preceded by lines which NULL the values causing
    rxvt_blank_screen_mem() to malloc suitable sizes. Does it
    really occur there or prehaps in rxvt_scroll_text() ?

     
  • Geoff Wing
    Geoff Wing
    2003-12-30

    • assigned_to: nobody --> gcw