diff options
author | Tim Prouty <tim.prouty@isilon.com> | 2008-03-03 13:32:54 -0800 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-04-11 11:33:33 +0200 |
commit | bb869741ddc3d82da02c96bef592dab6074ff142 (patch) | |
tree | 4b8d6ca57ebd747ff80d1ccf28212bb8f63e7b4d /source3/utils | |
parent | 245ebca937d1a98007ad8a85fbf7cdc812ba6316 (diff) | |
download | samba-bb869741ddc3d82da02c96bef592dab6074ff142.tar.gz samba-bb869741ddc3d82da02c96bef592dab6074ff142.tar.bz2 samba-bb869741ddc3d82da02c96bef592dab6074ff142.zip |
Cleanup size_t return values in convert_string_allocate
This patch is the first iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 59124382d2894a1b194b48dd82bc5f956959eb48)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/ntlm_auth_diagnostics.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c index 846b5ef42b..dfd05ad51c 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -470,18 +470,17 @@ static bool test_plaintext(enum ntlm_break break_which) exit(1); } - if ((convert_string_allocate(NULL, CH_UNIX, + if (!convert_string_allocate(NULL, CH_UNIX, CH_DOS, password, strlen(password)+1, - &lm_response.data,True)) == -1) { + &lm_response.data, + &lm_response.length, True)) { DEBUG(0, ("convert_string_allocate failed!\n")); exit(1); } SAFE_FREE(password); - lm_response.length = strlen((const char *)lm_response.data); - switch (break_which) { case BREAK_NONE: break; |