aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-config-druid.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 937fcc00e7..85c30a0d43 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-08 Dan Winship <danw@ximian.com>
+
+ * mail-config-druid.c (management_prepare): Rewrite this to not
+ use stpcpy, which isn't portable.
+
2002-03-08 Radek Doulik <rodo@ximian.com>
* mail-accounts.c (sig_event_client): handle name changed event
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index e43f0dfbf5..d1c0fabcc1 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -414,17 +414,18 @@ management_prepare (EvolutionWizard *wizard, gpointer data)
name = gtk_entry_get_text (gui->gui->email_address);
if (name && *name) {
if (mail_config_get_account_by_name (name)) {
- char *template, *p;
- unsigned int i = 1;
+ char *template;
+ unsigned int i = 1, len;
/* length of name + 1 char for ' ' + 1 char
for '(' + 10 chars for %d + 1 char for ')'
+ 1 char for nul */
- template = alloca (strlen (name) + 14);
- p = stpcpy (template, name);
+ len = strlen (name);
+ template = alloca (len + 14);
+ strcpy (template, name);
name = template;
do {
- sprintf (p, " (%d)", i++);
+ sprintf (template + len, " (%d)", i++);
} while (mail_config_get_account_by_name (name) && i != 0);
}