aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog3
-rw-r--r--e-util/e-font.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index d1e371d851..719915176e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,8 @@
2000-09-11 Dan Winship <danw@helixcode.com>
+ * e-font.c (find_best_bold): Thou shalt leave space for the
+ trailing \0.
+
* e-util.c (e_strstrcase): The return value should not be
const. (Well, unless the input was, but you can't know that.)
diff --git a/e-util/e-font.c b/e-util/e-font.c
index 64ea82700c..3d99c0619b 100644
--- a/e-util/e-font.c
+++ b/e-util/e-font.c
@@ -440,7 +440,7 @@ find_best_bold (gchar **namelist, gint length, gchar *weight)
g_hash_table_insert (wh, "black", GINT_TO_POINTER (8));
}
- s = alloca (strlen (weight));
+ s = alloca (strlen (weight) + 1);
strcpy (s, weight);
g_strdown (s);
sw = GPOINTER_TO_INT (g_hash_table_lookup (wh, s));