]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:passdb: Correctly burn the plaintext_pw with samu_destroy()
authorAndreas Schneider <asn@samba.org>
Mon, 18 Jul 2022 12:38:38 +0000 (14:38 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 Jul 2022 11:51:29 +0000 (11:51 +0000)
memset() can be removed from the optimizer.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/passdb/passdb.c

index 80d9e2c153975f171d41107b8eb0f9d0cfd6c50f..526dea5f7b4d77b7deb35469a91b66d2ed4719db 100644 (file)
@@ -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;
 }