From 12f97c0576c8ec6628971aa7f86d7cbc5e304293 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Mar 2010 13:05:29 -0700 Subject: [PATCH] Fix valgrind error when running under share level security. plaintext_password is a data blob with a data pointer pointing to an allocation of length zero. Jeremy. --- source3/auth/auth_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 6ec19da61a7..02eaf9d8c10 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -420,7 +420,7 @@ bool make_user_info_for_reply(struct auth_usersupplied_info **user_info, DEBUG(5,("make_user_info_for_reply: User passwords not in encrypted " "format.\n")); - if (plaintext_password.data) { + if (plaintext_password.data && plaintext_password.length) { unsigned char local_lm_response[24]; #ifdef DEBUG_PASSWORD @@ -448,7 +448,7 @@ bool make_user_info_for_reply(struct auth_usersupplied_info **user_info, local_lm_blob.data ? &local_lm_blob : NULL, local_nt_blob.data ? &local_nt_blob : NULL, NULL, NULL, - plaintext_password.data ? &plaintext_password : NULL, + plaintext_password.data && plaintext_password.length ? &plaintext_password : NULL, False); data_blob_free(&local_lm_blob); -- 2.34.1