1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

r14958: fixed big-endian dcerpc connections for the new string handling code

This commit is contained in:
Andrew Tridgell 2006-04-07 11:18:34 +00:00 committed by Gerald (Jerry) Carter
parent a3d6d28adc
commit 0617aebbbc

View File

@ -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);