From 439cc87bdd30f4a0f9e29e876230f4e7b25034de Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 12 Sep 2000 03:10:36 +0000 Subject: 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 --- e-util/ChangeLog | 3 +++ e-util/e-font.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 + * 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)); -- cgit v1.2.3