diff options
author | Not Zed <NotZed@Ximian.com> | 2005-01-12 16:42:10 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-01-12 16:42:10 +0800 |
commit | 0ad3fc1eb413d8b07c1a53011b890b81b8f71e39 (patch) | |
tree | 5e3ffbad64f26f53eb7e194f6bf6db7b57582bc3 /e-util | |
parent | 7b7c24f6b041f166993b68d4e11c10bd283df2ae (diff) | |
download | gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.gz gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.bz2 gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.lz gsoc2013-evolution-0ad3fc1eb413d8b07c1a53011b890b81b8f71e39.tar.xz 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')
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-url.c | 4 |
2 files changed, 8 insertions, 1 deletions
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 <NotZed@Ximian.com> + + * e-url.c (e_url_shroud): dont' use '%.*s' for truncating string + output. + 2005-01-09 JP Rosevear <jpr@novell.com> * 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); } |