On Fri, Aug 03, 2007 at 07:20:07PM +0200, Marc Glisse wrote: > Package: xterm > Version: 228-1 > Severity: normal > > Hello, > > if I try: > > LC_CTYPE=en_US.UTF-8 xterm -fwb nonexistent > > xterm crashes with the message below. I haven't seen this with any other > -fw -fb or -fn option or without an UTF-8 locale. > > Obviously this bug should not normally happen as we should specify valid > fonts, but for some reason the font I used as widebold disappeared, and > it was not obvious understanding why uxterm stopped working.
The cause is from a memory-leak fix in patch #209.
It's breaking because (unlike the case for which I made the change)
the value is from a resource-setting, not allocated by xterm.
Here's the change needed:
diff -u -r1.249 fontutils.c
--- fontutils.c 2007/06/17 12:50:22 1.249
+++ fontutils.c 2007/08/05 00:11:55
@@ -850,7 +850,6 @@
fnts[fWBold] = xtermCloseFont(xw, fnts[fWBold]);
}
if (fnts[fWBold] == 0) {
- free(myfonts.f_wb);
myfonts.f_wb = myfonts.f_w;
fnts[fWBold] = fnts[fWide];
TRACE(("...cannot load wide-bold, use wide %s\n",
NonNull(myfonts.f_w)));
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
pgpJu7cqndYtx.pgp
Description: PGP signature

