aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-09-12 11:10:36 +0800
committerDan Winship <danw@src.gnome.org>2000-09-12 11:10:36 +0800
commit439cc87bdd30f4a0f9e29e876230f4e7b25034de (patch)
treef195bb32445e1cf0a554016dc2dfeb669ab6b1e8 /e-util
parent5c8a30cf2714c43991150faba335c7f1bf92da3c (diff)
downloadgsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar.gz
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar.bz2
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar.lz
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar.xz
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.tar.zst
gsoc2013-evolution-439cc87bdd30f4a0f9e29e876230f4e7b25034de.zip
Thou shalt leave space for the trailing \0.
* e-font.c (find_best_bold): Thou shalt leave space for the trailing \0. svn path=/trunk/; revision=5355
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));