From: Andrew Bartlett Date: Thu, 18 Dec 2008 21:18:57 +0000 (+1100) Subject: Fix failures setting a random password X-Git-Tag: samba-4.0.0alpha6~467^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff98d7f9ce1213aeff3d196d8f415303974ffd77;p=thirdparty%2Fsamba.git 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 --- diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c index b902dddb0f7..bbb363e0dd4 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; }