aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-url.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-12 16:42:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-12 16:42:10 +0800
commit0ad3fc1eb413d8b07c1a53011b890b81b8f71e39 (patch)
tree5e3ffbad64f26f53eb7e194f6bf6db7b57582bc3 /e-util/e-url.c
parent7b7c24f6b041f166993b68d4e11c10bd283df2ae (diff)
downloadgsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.gz
gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.zst
gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.zip
dont' use '%.*s' for truncating string output.
2005-01-08 Not Zed <NotZed@Ximian.com> * e-url.c (e_url_shroud): dont' use '%.*s' for truncating string output. svn path=/trunk/; revision=28373
Diffstat (limited to 'e-util/e-url.c')
-rw-r--r--e-util/e-url.c4
1 files changed, 3 insertions, 1 deletions
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);
}