summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libnet/libnet_passwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c
index 96471df1dc..314ab5028a 100644
--- a/source4/libnet/libnet_passwd.c
+++ b/source4/libnet/libnet_passwd.c
@@ -574,7 +574,7 @@ UserInfo24:
ZERO_STRUCT(u_info);
encode_pw_buffer(u_info.info24.password.data, r->samr.in.newpassword, STR_UNICODE);
/* w2k3 ignores this length */
- u_info.info24.pw_len = str_charnum(r->samr.in.newpassword)*2;
+ u_info.info24.pw_len = strlen_m(r->samr.in.newpassword)*2;
status = dcerpc_fetch_session_key(c.pdc.out.dcerpc_pipe, &session_key);
if (!NT_STATUS_IS_OK(status)) {