[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12823: Invalid font name
From: |
Kenichi Handa |
Subject: |
bug#12823: Invalid font name |
Date: |
Tue, 27 Nov 2012 23:26:27 +0900 |
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@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@gnu.org>
+
+ * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
+ for the variable "f".
+
+2012-11-13 Kenichi Handa <handa@gnu.org>
+
+ * font.c (font_unparse_xlfd): Exclude special characters from the
+ generating XLFD name.
+
2012-11-27 Paul Eggert <eggert@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;
+ }
}
}
- bug#12823: Invalid font name, Stefan Monnier, 2012/11/07
- bug#12823: Invalid font name, Jan Djärv, 2012/11/07
- bug#12823: Invalid font name, Kenichi Handa, 2012/11/09
- bug#12823: Invalid font name, Kenichi Handa, 2012/11/13
- bug#12823: Invalid font name, Andreas Schwab, 2012/11/13
- bug#12823: Invalid font name, Kenichi Handa, 2012/11/15
- bug#12823: Invalid font name,
Kenichi Handa <=
- bug#12823: Invalid font name, Stefan Monnier, 2012/11/27
- bug#12823: Invalid font name, Kenichi Handa, 2012/11/28
- bug#12823: Invalid font name, Stefan Monnier, 2012/11/28