Commit e3928081 authored by Chong Yidong's avatar Chong Yidong
Browse files

(font_parse_xlfd): Handle patterns of length < 2.

parent 289e7f8f
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment