From 62c87a837463fdf09d9e7d1a605000c21f8da060 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 4 Apr 2018 13:01:37 +0200 Subject: Implement the wrapper function cleanse_buffer in masterpassword.c --- src/inputdialog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/inputdialog.c') diff --git a/src/inputdialog.c b/src/inputdialog.c index 340e488..2510bbb 100644 --- a/src/inputdialog.c +++ b/src/inputdialog.c @@ -44,6 +44,7 @@ #include "filesel.h" #include "prefs_common.h" #include "gtkutils.h" +#include "masterpassword.h" #include "utils.h" #define DIALOG_WIDTH 420 @@ -182,11 +183,12 @@ gchar *input_dialog_set_new_password(guint max_attempts) NULL); if (pass1 != NULL && pass2 != NULL && strcmp(pass1, pass2) == 0) { - /* TODO: clear before free? */ + cleanse_buffer(pass2, strlen(pass2)); g_free(pass2); break; } - /* TODO: clear before free? */ + cleanse_buffer(pass1, strlen(pass1)); + cleanse_buffer(pass2, strlen(pass2)); g_free(pass2); g_free(pass1); pass1 = NULL; -- cgit v1.3