summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-08-20 21:58:22 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-08-21 00:33:52 +0300
commit7e936e3122aed539b348bc5deea1732b65d94950 (patch)
tree9544f7fe7914535206ac34fe6dc5a9eb17f46a2b
parent26efea195ae3d5a26b1152923f114cd841e89b5f (diff)
downloadsamba-7e936e3122aed539b348bc5deea1732b65d94950.tar.gz
samba-7e936e3122aed539b348bc5deea1732b65d94950.tar.bz2
samba-7e936e3122aed539b348bc5deea1732b65d94950.zip
s4-ndr_basic.c: Fix ndr_*_hyper() when [bigendian] data is processed
-rw-r--r--librpc/ndr/ndr_basic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index 0becf38f7b..58d4e46e72 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -252,6 +252,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, i
_PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
{
NDR_PULL_ALIGN(ndr, 8);
+ if (NDR_BE(ndr)) {
+ return ndr_pull_udlongr(ndr, ndr_flags, v);
+ }
return ndr_pull_udlong(ndr, ndr_flags, v);
}
@@ -549,6 +552,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, i
_PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v)
{
NDR_PUSH_ALIGN(ndr, 8);
+ if (NDR_BE(ndr)) {
+ return ndr_push_udlongr(ndr, NDR_SCALARS, v);
+ }
return ndr_push_udlong(ndr, NDR_SCALARS, v);
}