emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wildcard Font Spec Bug


From: Kenichi Handa
Subject: Re: Wildcard Font Spec Bug
Date: Mon, 29 Jan 2001 08:47:48 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.0.94 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

Andrew Choi <address@hidden> writes:
> I have fixed a small bug in fontset.c
> (fontset_pattern_regexp) by allocating three additional
> bytes for holding the '^', '$', and '\0' characters in the
> generated regex.

Thank you!!!  Your fix is correct.

> This bug caused problems when handling font specs with
> proportionally many wildcard characters.  It caused Emacs
> to crash (at least on the Mac) when asked to evaluate
> (x-list-fonts "*"), for example.  If you are encountering
> similar problems, please see if the fix helps.

> Also we should consider fixing a similar problem that
> exists currently in w32fns.c (w32_font_match).

Sure.  I've just installed the attached change.

---
Ken'ichi HANDA
address@hidden

2001-01-29  Kenichi Handa  <address@hidden>

        * w32fns.c (w32_font_match): Allocate three more bytes to regex
        for '^', '$', and '\0'.

Index: w32fns.c
===================================================================
RCS file: /cvs/emacs/src/w32fns.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -c -r1.113 -r1.114
cvs server: conflicting specifications of output style
*** w32fns.c    2001/01/17 13:13:34     1.113
--- w32fns.c    2001/01/28 23:48:02     1.114
***************
*** 6489,6495 ****
      char * fontname;
      char * pattern;
  {
!   char *regex = alloca (strlen (pattern) * 2);
    char *font_name_copy = alloca (strlen (fontname) + 1);
    char *ptr;
  
--- 6489,6495 ----
      char * fontname;
      char * pattern;
  {
!   char *regex = alloca (strlen (pattern) * 2 + 3);
    char *font_name_copy = alloca (strlen (fontname) + 1);
    char *ptr;
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]