From 0ad3fc1eb413d8b07c1a53011b890b81b8f71e39 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 12 Jan 2005 08:42:10 +0000 Subject: dont' use '%.*s' for truncating string output. 2005-01-08 Not Zed * e-url.c (e_url_shroud): dont' use '%.*s' for truncating string output. svn path=/trunk/; revision=28373 --- e-util/ChangeLog | 5 +++++ e-util/e-url.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index a43adf06ed..7f3f016e89 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2005-01-08 Not Zed + + * e-url.c (e_url_shroud): dont' use '%.*s' for truncating string + output. + 2005-01-09 JP Rosevear * e-url.c (e_uri_new): fix parsing of query string diff --git a/e-util/e-url.c b/e-util/e-url.c index 503504b6b3..a0a67e7ecf 100644 --- a/e-util/e-url.c +++ b/e-util/e-url.c @@ -56,7 +56,9 @@ e_url_shroud (const char *url) } if (first_colon && last_at && first_colon < last_at) { - shrouded = g_strdup_printf ("%.*s%s", first_colon - url, url, last_at); + shrouded = g_malloc(first_colon - url + strlen(last_at)+1); + memcpy(shrouded, url, first_colon-url); + strcpy(shrouded + (first_colon-url), last_at); } else { shrouded = g_strdup (url); } -- cgit v1.2.3