summaryrefslogtreecommitdiff
path: root/source3/libsmb/clirap2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clirap2.c')
-rw-r--r--source3/libsmb/clirap2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c
index 5da67de95c..5a834e7b7a 100644
--- a/source3/libsmb/clirap2.c
+++ b/source3/libsmb/clirap2.c
@@ -586,7 +586,7 @@ int cli_NetUserAdd(struct cli_state *cli, RAP_USER_INFO_1 * userinfo )
PUTWORD(p, 0); /* pwencrypt */
if(userinfo->passwrd)
- PUTWORD(p,strnlen(userinfo->passwrd, RAP_UPASSWD_LEN));
+ PUTWORD(p,MIN(strlen(userinfo->passwrd), RAP_UPASSWD_LEN));
else
PUTWORD(p, 0); /* password length */