From b4d3399d631c042dc8aaa35073b72ad52fb50408 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Mon, 5 Jan 2015 02:38:11 +0300 Subject: [PATCH] Apply secure wipe after iconv failure Iconv conversion can fail in the middle of operation, so "pwbuf" can have some parts of the password, so it is safer to clean it up as if it would contain the whole converted password. Signed-off-by: Eygene Ryabinkin --- sm/minip12.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sm/minip12.c b/sm/minip12.c index ca4d248..0178d89 100644 --- a/sm/minip12.c +++ b/sm/minip12.c @@ -2436,8 +2436,6 @@ p12_build (gcry_mpi_t *kparms, const void *cert, size_t certlen, log_error ("error converting passphrase to" " requested charset '%s': %s\n", charset, strerror (errno)); - gcry_free (pwbuf); - pwbuf = NULL; jnlib_iconv_close (cd); goto failure; } -- 2.1.2