Hi,

several users have reported crashes with xterm on OpenBSD with /etc/malloc.conf pointing to 'J' (fill allocated areas with junk).
After some debugging, it appears that the following patch is needed to fix that.



-- Matthieu

Index: button.c
===================================================================
RCS file: /cvs/OpenBSD/XF4/xc/programs/xterm/button.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 button.c
--- button.c    13 Feb 2004 21:45:49 -0000      1.1.1.5
+++ button.c    14 Jul 2004 17:02:19 -0000
@@ -2108,7 +2108,8 @@
            endCol--;
     }
 
-    if (iswide(XTERM_CELL(endRow, endCol - 1))
+    if (endCol > 1 
+       && iswide(XTERM_CELL(endRow, endCol - 1))
        && XTERM_CELL(endRow, endCol) == HIDDEN_CHAR) {
        endCol += 1;
     }

Reply via email to