diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-07 11:18:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:45 -0500 |
commit | a40ce7f9f64ac8f45dc4f1d8d38ed63b3db0eb03 (patch) | |
tree | 87ae721f0a2f416c0dc2d3d9a930dee7189cfb99 /source4 | |
parent | 2d77ba65be2062ce5f233d0b3b2b58681aeee075 (diff) | |
download | samba-a40ce7f9f64ac8f45dc4f1d8d38ed63b3db0eb03.tar.gz |
r14958: fixed big-endian dcerpc connections for the new string handling code
(This used to be commit 0617aebbbcd27126aab71bc0502a736d7eee1d72)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/ndr/ndr_string.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index 46f58c9788a..5485f3ff5de 100644 --- a/source4/librpc/ndr/ndr_string.c +++ b/source4/librpc/ndr/ndr_string.c @@ -564,6 +564,10 @@ _PUBLIC_ NTSTATUS ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, const ch return NT_STATUS_OK; } + if (NDR_BE(ndr) && chset == CH_UTF16) { + chset = CH_UTF16BE; + } + NDR_PULL_NEED_BYTES(ndr, length*byte_mul); ret = convert_string_talloc(ndr->current_mem_ctx, @@ -584,6 +588,10 @@ _PUBLIC_ NTSTATUS ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const ch { ssize_t ret, required; + if (NDR_BE(ndr) && chset == CH_UTF16) { + chset = CH_UTF16BE; + } + required = byte_mul * length; NDR_PUSH_NEED_BYTES(ndr, required); |