summaryrefslogtreecommitdiff
path: root/librpc/ndr
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-03-24 10:59:41 +1100
committerAndrew Tridgell <tridge@samba.org>2011-03-24 01:47:26 +0100
commit15e84a9a09c5a86416e964a3258ee35718fbf45a (patch)
treea3c1d6698668e55b257c96fe2cace1ac7c8edb3a /librpc/ndr
parent451856698fc04a9426ec9cb1ec039574f82f56bb (diff)
downloadsamba-15e84a9a09c5a86416e964a3258ee35718fbf45a.tar.gz
samba-15e84a9a09c5a86416e964a3258ee35718fbf45a.tar.bz2
samba-15e84a9a09c5a86416e964a3258ee35718fbf45a.zip
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 <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
Diffstat (limited to 'librpc/ndr')
-rw-r--r--librpc/ndr/ndr_drsuapi.c2
-rw-r--r--librpc/ndr/ndr_string.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c
index 86ecdcb861..35216ff19d 100644
--- a/librpc/ndr/ndr_drsuapi.c
+++ b/librpc/ndr/ndr_drsuapi.c
@@ -109,7 +109,7 @@ static void _print_drsuapi_DsAttributeValue_str(struct ndr_print *ndr, const cha
CH_UTF16, CH_UNIX,
r->blob->data,
r->blob->length,
- (void **)&str, NULL, false)) {
+ (void **)&str, NULL)) {
ndr_print_string(ndr, "string", "INVALID CONVERSION");
} else {
ndr_print_string(ndr, "string", str);
diff --git a/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c
index 610676cf78..402cf4e4ad 100644
--- a/librpc/ndr/ndr_string.c
+++ b/librpc/ndr/ndr_string.c
@@ -86,7 +86,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
ndr->data+ndr->offset,
(len2 + c_len_term)*byte_mul,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -124,7 +124,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -163,7 +163,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -198,7 +198,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
ndr->data+ndr->offset,
(len3 + c_len_term)*byte_mul,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -230,7 +230,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
CH_UNIX,
ndr->data+ndr->offset, len3,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -249,7 +249,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX,
ndr->data+ndr->offset, len1,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -274,7 +274,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
CH_UNIX,
ndr->data+ndr->offset, len1,
(void **)(void *)&as,
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion with flags 0x%x", flags);
@@ -334,7 +334,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
s_len++;
}
if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len,
- (void **)(void *)&dest, &d_len, false))
+ (void **)(void *)&dest, &d_len))
{
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character push conversion with flags 0x%x", flags);
@@ -684,7 +684,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags,
if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX,
ndr->data+ndr->offset, length*byte_mul,
discard_const_p(void *, var),
- &converted_size, false))
+ &converted_size))
{
return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion");
@@ -707,7 +707,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
NDR_PUSH_NEED_BYTES(ndr, required);
ret = convert_string(CH_UNIX, chset,
var, strlen(var),
- ndr->data+ndr->offset, required, false);
+ ndr->data+ndr->offset, required);
if (ret == -1) {
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion");