From f874646136270eddc54227796356e2d2fc7e4e67 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 9 May 2001 17:57:08 +0000 Subject: check for valid pointer before calling memset() in samr_clear_sam_passwd (This used to be commit a6a4a17f6afce9d1c10c5ab551ce0b6b5f5c1865) --- source3/rpc_server/srv_samr_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 693ef95df9..e4289dd457 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -79,8 +79,8 @@ static void samr_clear_sam_passwd(SAM_ACCOUNT *sam_pass) if (!sam_pass) return; - memset(sam_pass->lm_pw, '\0', 16); - memset(sam_pass->nt_pw, '\0', 16); + if (sam_pass->lm_pw) memset(sam_pass->lm_pw, '\0', 16); + if (sam_pass->nt_pw) memset(sam_pass->nt_pw, '\0', 16); } /******************************************************************* -- cgit