summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-05-09 17:57:08 +0000
committerGerald Carter <jerry@samba.org>2001-05-09 17:57:08 +0000
commitf874646136270eddc54227796356e2d2fc7e4e67 (patch)
treec2b387af20d019d326f0376035cbca9aca1956ba
parent90fbea8cb5bc03e0e64f7a903ed1c73011f6b0c7 (diff)
downloadsamba-f874646136270eddc54227796356e2d2fc7e4e67.tar.gz
samba-f874646136270eddc54227796356e2d2fc7e4e67.tar.bz2
samba-f874646136270eddc54227796356e2d2fc7e4e67.zip
check for valid pointer before calling memset() in samr_clear_sam_passwd
(This used to be commit a6a4a17f6afce9d1c10c5ab551ce0b6b5f5c1865)
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
1 files 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);
}
/*******************************************************************