summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/auth/smbencrypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index 9fce590d43..67da795a44 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -460,6 +460,9 @@ BOOL encode_pw_buffer(uint8_t buffer[516], const char *password, int string_flag
uint8_t new_pw[512];
size_t new_pw_len;
+ /* the incoming buffer can be any alignment. */
+ string_flags |= STR_NOALIGN;
+
new_pw_len = push_string(new_pw,
password,
sizeof(new_pw), string_flags);
@@ -489,6 +492,9 @@ BOOL decode_pw_buffer(uint8_t in_buffer[516], char *new_pwrd,
{
int byte_len=0;
+ /* the incoming buffer can be any alignment. */
+ string_flags |= STR_NOALIGN;
+
/*
Warning !!! : This function is called from some rpc call.
The password IN the buffer may be a UNICODE string.