From 1b18f022ca57ebebb272a148b25173d92b2b89c5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 29 Jan 2001 09:15:03 +0000 Subject: Always include +1 for the size. 0*2 == 0, so malloc returns NULL, which is 2001-01-29 Not Zed * gal/widgets/e-unicode.c (e_utf8_xml1_decode): Always include +1 for the size. 0*2 == 0, so malloc returns NULL, which is not what we want. svn path=/trunk/; revision=7885 --- widgets/misc/e-unicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c index a74ec7527a..4ea7c2ce58 100644 --- a/widgets/misc/e-unicode.c +++ b/widgets/misc/e-unicode.c @@ -481,7 +481,7 @@ e_utf8_xml1_decode (const gchar *text) g_return_val_if_fail (text != NULL, NULL); - len = strlen (text); + len = strlen (text)+1; /* len * 2 is absolute maximum */ u = d = g_malloc (len * 2); -- cgit v1.2.3