* Fixes NB#90984, clean a password before freeing memory
authorSergio Villar Senin <svillar@igalia.com>
Tue, 28 Oct 2008 09:33:35 +0000 (09:33 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 28 Oct 2008 09:33:35 +0000 (09:33 +0000)
pmo-trunk-r6174

src/modest-account-mgr-helpers.c

index 3a23316..989663d 100644 (file)
@@ -33,6 +33,7 @@
 #include <modest-runtime.h>
 #include <modest-defs.h>
 #include <string.h>
+#include <strings.h>
 
 static const gchar * null_means_empty (const gchar * str);
 
@@ -321,8 +322,11 @@ modest_account_mgr_get_server_account_has_password (ModestAccountMgr *self, cons
                TRUE /* server account */);
        if (password && strlen (password)) {
                result = TRUE;
-       }
        
+               /* Clean password */
+               bzero (password, strlen (password));
+       }
+
        g_free (password);
        return result;
 }