From 68b7863f19fcd02a75cc86b7377ab9a7aebb46df Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 18 Jul 2022 14:38:38 +0200 Subject: [PATCH] s3:passdb: Correctly burn the plaintext_pw with samu_destroy() memset() can be removed from the optimizer. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- source3/passdb/passdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 80d9e2c1539..526dea5f7b4 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -47,7 +47,7 @@ static int samu_destroy(struct samu *user) data_blob_clear_free( &user->nt_pw ); if ( user->plaintext_pw ) - memset( user->plaintext_pw, 0x0, strlen(user->plaintext_pw) ); + BURN_PTR_SIZE(user->plaintext_pw, strlen(user->plaintext_pw)); return 0; } -- 2.47.3