talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 47421445ccb941a1ec3b227a7aea485aec909acb
parent fb0b04b4f0a0c024e7f4021f329a3847705ba752
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Mon, 10 Jul 2017 18:36:37 +0200

Fix uninitialized values in sieve privacy prefs parsing.

This happens if username and/or password fields are empty,
so sscanf() doesn't get to write into our enc_userid and
enc_passwd buffers.

Diffstat:
Msrc/plugins/managesieve/sieve_prefs.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/plugins/managesieve/sieve_prefs.c b/src/plugins/managesieve/sieve_prefs.c @@ -503,6 +503,8 @@ struct SieveAccountConfig *sieve_prefs_account_get_config( if (confstr == NULL) return config; + enc_userid[0] = '\0'; + enc_passwd[0] = '\0'; #if defined(G_OS_WIN32) || defined(__OpenBSD__) sscanf(confstr, "%c%c %255s %c%hu %hhu %hhu %hhu %255s %255s", #else