From 4a76d29374769ba4c075b8d5767498848d2e17d6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 18 Feb 2010 13:40:44 +0100 Subject: [PATCH] libndr: for now align reverse relative pointers to 2 bytes by default. This is just a hack and we should let the callers use FLAG_ALIGN2 explicit in future. metze --- librpc/ndr/ndr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index 93fbb995f9c..61745aa55ac 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1222,6 +1222,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons /* the reversed offset is at the end of the main buffer */ correct_offset = ndr->relative_end_offset - len; + /* TODO: remove this hack and let the idl use FLAG_ALIGN2 explicit */ + align = 2; + if (ndr->flags & LIBNDR_FLAG_ALIGN2) { align = 2; } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { -- 2.34.1