From 15e84a9a09c5a86416e964a3258ee35718fbf45a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 24 Mar 2011 10:59:41 +1100 Subject: charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104 --- source3/libsmb/clifile.c | 7 +++---- source3/libsmb/climessage.c | 6 +++--- source3/libsmb/clirap.c | 5 ++--- source3/libsmb/clitrans.c | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 72f0e4b8eb..fcf31561be 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -58,7 +58,7 @@ static uint8_t *internal_bytes_push_str(uint8_t *buf, bool ucs2, if (!convert_string_talloc(talloc_tos(), CH_UNIX, ucs2 ? CH_UTF16LE : CH_DOS, str, str_len, &converted, - &converted_size, true)) { + &converted_size)) { return NULL; } @@ -445,8 +445,7 @@ NTSTATUS cli_posix_readlink_recv(struct tevent_req *req, struct cli_state *cli, state->data, state->num_data, &converted, - &converted_size, - true)) { + &converted_size)) { return NT_STATUS_NO_MEMORY; } @@ -5417,7 +5416,7 @@ NTSTATUS cli_shadow_copy_data_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, ret = convert_string_talloc( names, CH_UTF16LE, CH_UNIX, src, 2 * sizeof(SHADOW_COPY_LABEL), - &names[i], &converted_size, True); + &names[i], &converted_size); if (!ret) { TALLOC_FREE(names); return NT_STATUS_INVALID_NETWORK_RESPONSE; diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c index 4c730c4b76..2c2921aa0c 100644 --- a/source3/libsmb/climessage.c +++ b/source3/libsmb/climessage.c @@ -47,12 +47,12 @@ static struct tevent_req *cli_message_start_send(TALLOC_CTX *mem_ctx, if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_DOS, username, strlen(username)+1, - &utmp, &ulen, true)) { + &utmp, &ulen)) { goto fail; } if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_DOS, host, strlen(host)+1, - &htmp, &hlen, true)) { + &htmp, &hlen)) { goto fail; } @@ -154,7 +154,7 @@ static struct tevent_req *cli_message_text_send(TALLOC_CTX *mem_ctx, SSVAL(&state->vwv, 0, grp); if (convert_string_talloc(talloc_tos(), CH_UNIX, CH_DOS, msg, msglen, - &tmp, &tmplen, true)) { + &tmp, &tmplen)) { msg = tmp; msglen = tmplen; } else { diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 1756c479b4..141db7131e 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -1039,7 +1039,7 @@ static bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata, tmp_buf[nlen+1] = 0; if (!convert_string_talloc(streams, CH_UTF16, CH_UNIX, tmp_buf, - nlen+2, &vstr, &size, false)) + nlen+2, &vstr, &size)) { TALLOC_FREE(tmp_buf); goto fail; @@ -1285,8 +1285,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin rdata + 4, len, &converted, - &converted_size, - true)) { + &converted_size)) { return NT_STATUS_NO_MEMORY; } fstrcpy(alt_name, converted); diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c index 42632f394f..dab8c10c84 100644 --- a/source3/libsmb/clitrans.c +++ b/source3/libsmb/clitrans.c @@ -384,7 +384,7 @@ struct tevent_req *cli_trans_send( cli_ucs2(cli) ? CH_UTF16LE : CH_DOS, pipe_name, strlen(pipe_name) + 1, &state->pipe_name_conv, - &state->pipe_name_conv_len, true))) { + &state->pipe_name_conv_len))) { tevent_req_nterror(req, NT_STATUS_NO_MEMORY); return tevent_req_post(req, ev); } -- cgit