1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

libsmb: Fix CID 241313 Array compared against 0

userinfo->passwrd is not a pointer, no point in checking for !=NULL

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
This commit is contained in:
Volker Lendecke 2013-11-09 21:11:41 +01:00 committed by Ira Cooper
parent c85deeed32
commit 6b7b007a67

View File

@ -867,10 +867,8 @@ int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo )
PUTWORD(p, 1); /* info level */
PUTWORD(p, 0); /* pwencrypt */
if(userinfo->passwrd)
PUTWORD(p,MIN(strlen((const char *)userinfo->passwrd), RAP_UPASSWD_LEN));
else
PUTWORD(p, 0); /* password length */
PUTWORD(p, MIN(strlen((const char *)userinfo->passwrd),
RAP_UPASSWD_LEN));
p = data;
memset(data, '\0', soffset);