all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3682: marked as done (23.1.50; segfault when font style begins with a number)
       [not found] ` <4A20329601B7D2EF@>
@ 2009-06-26  6:25   ` Emacs bug Tracking System
  0 siblings, 0 replies; only message in thread
From: Emacs bug Tracking System @ 2009-06-26  6:25 UTC (permalink / raw
  To: Kenichi Handa

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]


Your message dated Fri, 26 Jun 2009 15:17:48 +0900
with message-id <E1MK4ku-0007Ey-8h@etlken>
and subject line Re: bug#3682: 23.1.50; segfault when font style begins with a number
has caused the Emacs bug report #3682,
regarding 23.1.50; segfault when font style begins with a number
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3682: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3682
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3376 bytes --]

From: Peter Jolly <peter@jollys.org>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; segfault when font style begins with a number
Date: Fri, 26 Jun 2009 01:00:09 +0100 (added by postmaster@woodbine.london.02.net)
Message-ID: <4A20329601B7D2EF@> (added by postmaster@woodbine.london.02.net)

get_adstyle_property() in ftfont.c appears to extract the first
whitespace-delimited word from a font's style string and pass it to
font_intern_prop().  When this function is called from ftfont_list()
-- at line 1028 in the current HEAD -- the return value is assumed to
be either nil or a symbol.

I have a font on my computer that has the style "55 Roman".  For this
font, get_adstyle_property() winds up returning an integer instead.
ftfont_list() sticks this into SYMBOL_NAME() and promptly segfaults.

The trivial patch below prevents the crash, but I don't understand the
code well enough to tell whether it's the right solution.  Maybe
ftfont_list() should be handling the integer case instead.


diff --git a/src/ftfont.c b/src/ftfont.c
index 70c1797..789e6a7 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -177,7 +177,7 @@ get_adstyle_property (FcPattern *p)
       || xstrcasecmp (str, "Oblique") == 0
       || xstrcasecmp (str, "Italic") == 0)
     return Qnil;
-  adstyle = font_intern_prop (str, end - str, 0);
+  adstyle = font_intern_prop (str, end - str, 1);
   if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0)
     return Qnil;
   return adstyle;


[-- Attachment #3: Type: message/rfc822, Size: 3327 bytes --]

From: Kenichi Handa <handa@m17n.org>
To: Peter Jolly <peter@jollys.org>, 3682-done@emacsbugs.donarmstrong.com
Subject: Re: bug#3682: 23.1.50; segfault when font style begins with a number
Date: Fri, 26 Jun 2009 15:17:48 +0900
Message-ID: <E1MK4ku-0007Ey-8h@etlken>

In article <4A20329601B7D2EF@> (added by postmaster@woodbine.london.02.net), Peter Jolly <peter@jollys.org> writes:

> get_adstyle_property() in ftfont.c appears to extract the first
> whitespace-delimited word from a font's style string and pass it to
> font_intern_prop().  When this function is called from ftfont_list()
> -- at line 1028 in the current HEAD -- the return value is assumed to
> be either nil or a symbol.

> I have a font on my computer that has the style "55 Roman".  For this
> font, get_adstyle_property() winds up returning an integer instead.
> ftfont_list() sticks this into SYMBOL_NAME() and promptly segfaults.

> The trivial patch below prevents the crash, but I don't understand the
> code well enough to tell whether it's the right solution.  Maybe
> ftfont_list() should be handling the integer case instead.

Thank you for the report.  Your patch is correct.  I've just
installed it to EMACS_23_1_RC and trunk.

---
Kenichi Handa
handa@m17n.org

> diff --git a/src/ftfont.c b/src/ftfont.c
> index 70c1797..789e6a7 100644
> --- a/src/ftfont.c
> +++ b/src/ftfont.c
> @@ -177,7 +177,7 @@ get_adstyle_property (FcPattern *p)
>        || xstrcasecmp (str, "Oblique") == 0
>        || xstrcasecmp (str, "Italic") == 0)
>      return Qnil;
> -  adstyle = font_intern_prop (str, end - str, 0);
> +  adstyle = font_intern_prop (str, end - str, 1);
>    if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0)
>      return Qnil;
>    return adstyle;





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-26  6:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1MK4ku-0007Ey-8h@etlken>
     [not found] ` <4A20329601B7D2EF@>
2009-06-26  6:25   ` bug#3682: marked as done (23.1.50; segfault when font style begins with a number) Emacs bug Tracking System

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.