From cc4901123daff9da1e0872dbd38575770e3a68d6 Mon Sep 17 00:00:00 2001 From: Andrew Walker Date: Wed, 28 Oct 2020 14:38:48 -0400 Subject: [PATCH] s3:rpcclient fix NULL - deref caused by misuse of chgpasswd3 Passing wrong number of arguments to chgpasswd3 will cause rpcclient to crash. Signed-off-by: Andrew Walker Reviewed-by: Jeremy Allison Reviewed-by: Douglas Bagnall Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Oct 29 03:31:56 UTC 2020 on sn-devel-184 --- source3/rpcclient/cmd_samr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index d30f4184cc6..eb7f7fc8424 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -3033,7 +3033,7 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli, struct userPwdChangeFailureInformation *reject = NULL; struct dcerpc_binding_handle *b = cli->binding_handle; - if (argc < 3) { + if (argc < 4) { printf("Usage: %s username oldpass newpass\n", argv[0]); return NT_STATUS_INVALID_PARAMETER; } -- 2.47.3