[Commits] [SCM] claws branch, master, updated. 3.14.0-26-g569c7e1
ticho at claws-mail.org
ticho at claws-mail.org
Wed Aug 24 00:09:21 CEST 2016
The branch, master has been updated
via 569c7e1e20daa354eaccdec5160398ae0ba71d74 (commit)
from 61bced3dfe1b5bfcfa512fcc5e0c35fd163d8ac0 (commit)
Summary of changes:
src/plugins/vcalendar/vcal_prefs.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit 569c7e1e20daa354eaccdec5160398ae0ba71d74
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Wed Aug 24 00:08:40 2016 +0200
Fix crash in vcalendar passwords handling on prefs save.
diff --git a/src/plugins/vcalendar/vcal_prefs.c b/src/plugins/vcalendar/vcal_prefs.c
index 8686ba8..3968172 100644
--- a/src/plugins/vcalendar/vcal_prefs.c
+++ b/src/plugins/vcalendar/vcal_prefs.c
@@ -555,16 +555,12 @@ static void vcal_prefs_create_widget_func(PrefsPage * _page,
if (!vcalprefs.export_user)
vcalprefs.export_user = g_strdup("");
- if (!vcalprefs.export_pass)
- vcalprefs.export_pass = g_strdup("");
if (!vcalprefs.export_freebusy_user)
vcalprefs.export_freebusy_user = g_strdup("");
- if (!vcalprefs.export_freebusy_pass)
- vcalprefs.export_freebusy_pass = g_strdup("");
export_pass = vcal_passwd_get("export");
export_freebusy_pass = vcal_passwd_get("export_freebusy");
-
+
gtk_entry_set_text(GTK_ENTRY(export_user_entry), vcalprefs.export_user);
gtk_entry_set_text(GTK_ENTRY(export_pass_entry), (export_pass != NULL ? export_pass : ""));
gtk_entry_set_text(GTK_ENTRY(export_freebusy_user_entry), vcalprefs.export_freebusy_user);
@@ -680,7 +676,6 @@ static void vcal_prefs_save_func(PrefsPage * _page)
g_free(vcalprefs.export_user);
vcalprefs.export_user =
gtk_editable_get_chars(GTK_EDITABLE(page->export_user_entry), 0, -1);
- g_free(vcalprefs.export_pass);
pass = gtk_editable_get_chars(GTK_EDITABLE(page->export_pass_entry), 0, -1);
vcal_passwd_set("export", pass);
@@ -703,7 +698,6 @@ static void vcal_prefs_save_func(PrefsPage * _page)
g_free(vcalprefs.export_freebusy_user);
vcalprefs.export_freebusy_user =
gtk_editable_get_chars(GTK_EDITABLE(page->export_freebusy_user_entry), 0, -1);
- g_free(vcalprefs.export_freebusy_pass);
pass = gtk_editable_get_chars(GTK_EDITABLE(page->export_freebusy_pass_entry), 0, -1);
vcal_passwd_set("export_freebusy", pass);
@@ -746,12 +740,16 @@ void vcal_prefs_init(void)
passwd_store_set(PWS_PLUGIN, "vCalendar", "export",
vcalprefs.export_pass, TRUE);
passwords_migrated = TRUE;
+ memset(vcalprefs.export_pass, 0, strlen(vcalprefs.export_pass));
+ g_free(vcalprefs.export_pass);
}
if (vcalprefs.export_freebusy_pass != NULL &&
strlen(vcalprefs.export_freebusy_pass) > 0) {
passwd_store_set(PWS_PLUGIN, "vCalendar", "export",
vcalprefs.export_freebusy_pass, TRUE);
passwords_migrated = TRUE;
+ memset(vcalprefs.export_freebusy_pass, 0, strlen(vcalprefs.export_freebusy_pass));
+ g_free(vcalprefs.export_freebusy_pass);
}
if (passwords_migrated)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list