From ff98d7f9ce1213aeff3d196d8f415303974ffd77 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 19 Dec 2008 08:18:57 +1100 Subject: Fix failures setting a random password The test in extract_pw_from_buffer was incorrect: It tested if the first byte of the new password was 0 (a 1/256 chance for the random passwords), not if the password was allocated. Andrew Bartlett --- source4/libcli/auth/smbencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c index b902dddb0f..bbb363e0dd 100644 --- a/source4/libcli/auth/smbencrypt.c +++ b/source4/libcli/auth/smbencrypt.c @@ -585,7 +585,7 @@ bool extract_pw_from_buffer(TALLOC_CTX *mem_ctx, *new_pass = data_blob_talloc(mem_ctx, &in_buffer[512 - byte_len], byte_len); - if (!*new_pass->data) { + if (!new_pass->data) { return false; } -- cgit