From: Chong Yidong Date: Sat, 24 Jan 2009 03:17:42 +0000 (+0000) Subject: (font_parse_xlfd): Handle patterns of length < 2. X-Git-Tag: emacs-pretest-23.0.90~247 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e39280819e790687744367fae6f4e01449a75f30;p=emacs.git (font_parse_xlfd): Handle patterns of length < 2. --- diff --git a/src/font.c b/src/font.c index 6eb77dc195d..0010c1c3eb7 100644 --- a/src/font.c +++ b/src/font.c @@ -1066,11 +1066,11 @@ font_parse_xlfd (name, font) Lisp_Object val; char *p; - if (len > 255) + if (len > 255 || !len) /* Maximum XLFD name length is 255. */ return -1; /* Accept "*-.." as a fully specified XLFD. */ - if (name[0] == '*' && name[1] == '-') + if (name[0] == '*' && (len == 1 || name[1] == '-')) i = 1, f[XLFD_FOUNDRY_INDEX] = name; else i = 0;