1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Merge Andrew Bartletts (size_t)-1 checks.

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent aef9af7874
commit 339f4fe15e
2 changed files with 4 additions and 4 deletions

View File

@ -185,13 +185,13 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
goto done; goto done;
} }
if (pull_utf8_talloc(mem_ctx, &user, state->request.data.auth_crap.user) < 0) { if (pull_utf8_talloc(mem_ctx, &user, state->request.data.auth_crap.user) == (size_t)-1) {
DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n"));
} }
if (*state->request.data.auth_crap.domain) { if (*state->request.data.auth_crap.domain) {
char *dom = NULL; char *dom = NULL;
if (pull_utf8_talloc(mem_ctx, &dom, state->request.data.auth_crap.domain) < 0) { if (pull_utf8_talloc(mem_ctx, &dom, state->request.data.auth_crap.domain) (size_t)-1) {
DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n"));
} }
domain = dom; domain = dom;
@ -215,7 +215,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
if (*state->request.data.auth_crap.workstation) { if (*state->request.data.auth_crap.workstation) {
char *wrk = NULL; char *wrk = NULL;
if (pull_utf8_talloc(mem_ctx, &wrk, state->request.data.auth_crap.workstation) < 0) { if (pull_utf8_talloc(mem_ctx, &wrk, state->request.data.auth_crap.workstation) == (size_t)-1) {
DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n"));
} }
workstation = wrk; workstation = wrk;

View File

@ -730,7 +730,7 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83)
DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName, DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName,
need83 ? "True" : "False", cache83 ? "True" : "False")); need83 ? "True" : "False", cache83 ? "True" : "False"));
if (push_ucs2_allocate(&OutName_ucs2, OutName) < 0) { if (push_ucs2_allocate(&OutName_ucs2, OutName) == (size_t)-1) {
DEBUG(0, ("push_ucs2_allocate failed!\n")); DEBUG(0, ("push_ucs2_allocate failed!\n"));
return; return;
} }