tags 325528 - unreproducible
tags 325528 + patch
found 325528 1.2.0-5
thanks

On Tue, Aug 30, 2005 at 04:22:36AM +0900, Hidetaka Iwai wrote:
>Marc Dequènes (Duck) <[EMAIL PROTECTED]> wrote:
>> Using any sample file provided with mgp resulted in a segfault after
>> rendering background, so i guess when rendering text. See the attached
>> backtrace showing segfault occuring deep in libm17n (which made me
>> report on libm17n-0 instead of mgp).
>
>I can't reproduct this problem with mgp 1.11b-5 on the following
>environment, so could you please give me more information?

The problem appears to be caused by fonts which have no "family", an
example being "-cronyx-nil-medium-r-normal--2-20-75-75-c-10-iso10646-1"
(from xfonts-cronyx-misc).

Such fonts cause mplist_find_by_key(plist, family) to match a list entry
with a NULL key.  As this entry also has a NULL val, xfont_table becomes
NULL, which causes the SEGV at m17n-X.c:560 in the initial bug report:

  MLIST_APPEND1(xfont_table, fonts, font, MERROR_WIN);

I'm not sure how these fonts should be handled, but the following patch
removes the SEGV (by skipping fonts with no "family").

--bod

--- m17n-lib-1.2.0.orig/src/m17n-X.c    2004-11-08 18:49:10.000000000 +1100
+++ m17n-lib-1.2.0/src/m17n-X.c 2006-01-03 18:53:01.603258394 +1100
@@ -488,6 +488,9 @@
        int base_len;
        int fields;
        
+       if (!family)
+         continue;
+
        if (p && MPLIST_KEY (p) != family)
          p = mplist_find_by_key (plist, family);
        if (p)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to