[Commits] [SCM] claws branch, master, updated. 3.10.1-12-g573f5ca
Colin
colin at claws-mail.org
Thu Jun 12 10:33:42 CEST 2014
The branch master of project "claws" (Claws Mail) has been updated
via 573f5ca6c50b7540322cfcc77f7a1ab7ff333245 (commit)
from 89b7b7a794d193ef409de4cb73a6748de2bd3d5a (commit)
- Log -----------------------------------------------------------------
commit 573f5ca6c50b7540322cfcc77f7a1ab7ff333245
Author: Colin Leroy <colin at colino.net>
Date: Thu Jun 12 09:50:34 2014 +0200
Fix wrong replace in default strings, introduced by
a Coverity fix
diff --git a/src/wizard.c b/src/wizard.c
index 0974120..717bb9f 100644
--- a/src/wizard.c
+++ b/src/wizard.c
@@ -328,8 +328,8 @@ static gchar *get_name_for_mail(void)
#define PARSE_DEFAULT(str) { \
gchar *tmp = NULL, *new = NULL; \
if (str != NULL) { \
- tmp = g_strdup(str); \
- if (strstr(tmp, "$USERNAME")) { \
+ if (strstr(str, "$USERNAME")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$USERNAME") = '\0'; \
new = g_strconcat(tmp, g_get_real_name(), \
strstr(str, "$USERNAME")+strlen("$USERNAME"), \
@@ -339,7 +339,8 @@ static gchar *get_name_for_mail(void)
str = new; \
new = NULL; \
} \
- if (strstr(tmp, "$LOGIN")) { \
+ if (strstr(str, "$LOGIN")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$LOGIN") = '\0'; \
new = g_strconcat(tmp, g_get_user_name(), \
strstr(str, "$LOGIN")+strlen("$LOGIN"), \
@@ -349,7 +350,8 @@ static gchar *get_name_for_mail(void)
str = new; \
new = NULL; \
} \
- if (strstr(tmp, "$EMAIL")) { \
+ if (strstr(str, "$EMAIL")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$EMAIL") = '\0'; \
new = g_strconcat(tmp, tmpl.email, \
strstr(str, "$EMAIL")+strlen("$EMAIL"), \
@@ -359,7 +361,8 @@ static gchar *get_name_for_mail(void)
str = new; \
new = NULL; \
} \
- if (strstr(tmp, "$NAME_MAIL")) { \
+ if (strstr(str, "$NAME_MAIL")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$NAME_MAIL") = '\0'; \
new = g_strconcat(tmp, get_name_for_mail(), \
strstr(str, "$NAME_MAIL")+strlen("$NAME_MAIL"), \
@@ -369,7 +372,8 @@ static gchar *get_name_for_mail(void)
str = new; \
new = NULL; \
} \
- if (strstr(tmp, "$DEFAULTDOMAIN")) { \
+ if (strstr(str, "$DEFAULTDOMAIN")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$DEFAULTDOMAIN") = '\0'; \
new = g_strconcat(tmp, wizard_get_default_domain_name(), \
strstr(str, "$DEFAULTDOMAIN")+strlen("$DEFAULTDOMAIN"), \
@@ -379,7 +383,8 @@ static gchar *get_name_for_mail(void)
str = new; \
new = NULL; \
} \
- if (strstr(tmp, "$DOMAIN")) { \
+ if (strstr(str, "$DOMAIN")) { \
+ tmp = g_strdup(str); \
*strstr(tmp, "$DOMAIN") = '\0'; \
new = g_strconcat(tmp, tmpl.domain, \
strstr(str, "$DOMAIN")+strlen("$DOMAIN"), \
-----------------------------------------------------------------------
Summary of changes:
src/wizard.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list