GNU bug report logs -
#12823
Invalid font name
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Wed, 7 Nov 2012 15:16:01 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 12823 <at> debbugs.gnu.org (full text, mbox):
For fixing this bug, I've just installed this change to
trunk (rev. 111019). But, as the bug had caused crashing,
it may be better to apply the change to emacs-24.
---
Kenichi Handa
handa <at> gnu.org
=== modified file 'src/ChangeLog'
--- src/ChangeLog 2012-11-27 05:38:42 +0000
+++ src/ChangeLog 2012-11-27 13:40:38 +0000
@@ -1,3 +1,13 @@
+2012-11-18 Kenichi Handa <handa <at> gnu.org>
+
+ * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
+ for the variable "f".
+
+2012-11-13 Kenichi Handa <handa <at> gnu.org>
+
+ * font.c (font_unparse_xlfd): Exclude special characters from the
+ generating XLFD name.
+
2012-11-27 Paul Eggert <eggert <at> cs.ucla.edu>
Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
=== modified file 'src/font.c'
--- src/font.c 2012-11-06 13:26:20 +0000
+++ src/font.c 2012-11-27 13:40:38 +0000
@@ -1234,8 +1234,21 @@
f[j] = "*";
else
{
+ int c, k, l;
+ ptrdiff_t alloc;
+
val = SYMBOL_NAME (val);
- f[j] = SSDATA (val);
+ alloc = SBYTES (val) + 1;
+ if (nbytes <= alloc)
+ return -1;
+ f[j] = p = alloca (alloc);
+ /* Copy the name while excluding '-', '?', ',', and '"'. */
+ for (k = l = 0; k < alloc; k++)
+ {
+ c = SREF (val, k);
+ if (c != '-' && c != '?' && c != ',' && c != '"')
+ p[l++] = c;
+ }
}
}
This bug report was last modified 10 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.