From: Andreas Schneider Date: Mon, 18 Jul 2022 12:38:38 +0000 (+0200) Subject: s3:passdb: Correctly burn the plaintext_pw with samu_destroy() X-Git-Tag: samba-4.17.0rc1~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68b7863f19fcd02a75cc86b7377ab9a7aebb46df;p=thirdparty%2Fsamba.git 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 --- 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; }