Correctly check for errors in strlower_m() returns.
[kai/samba.git] / source3 / winbindd / wb_fill_pwent.c
index a716245ce85464e337ea92e732a7e38ae65541a9..62b1b4a18969073f6c3433ed5de6b49327ad38a9 100644 (file)
@@ -111,7 +111,10 @@ static void wb_fill_pwent_sid2gid_done(struct tevent_req *subreq)
        /* Username */
 
        fstrcpy(user_name, state->info->acct_name);
-       strlower_m(user_name);
+       if (!strlower_m(user_name)) {
+               tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+               return;
+       }
        status = normalize_name_map(state, domain, user_name, &mapped_name);
 
        /* Basic removal of whitespace */