From 7bcd9c5583ac2f750aa9c90af7d1ac86eb36f86f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 30 Apr 2010 01:08:07 +0200 Subject: libndr: add support for relative_rap_convert. Will not harm anyone, is only used for rare short (2byte) relative pointers, and relative_rap_convert is always 0 so far (as all init functions using struct ndr_pull will zero the struct). Guenther --- librpc/ndr/libndr.h | 1 + librpc/ndr/ndr_basic.c | 1 + 2 files changed, 2 insertions(+) diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 133a119069..d5091a6619 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -62,6 +62,7 @@ struct ndr_pull { uint32_t relative_highest_offset; uint32_t relative_base_offset; + uint32_t relative_rap_convert; struct ndr_token_list *relative_base_list; struct ndr_token_list *relative_list; diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index f7d6ee0449..d0d58b0884 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -185,6 +185,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr_short(struct ndr_pull *ndr, uin if (*v != 0) { ndr->ptr_count++; } + *(v) -= ndr->relative_rap_convert; return NDR_ERR_SUCCESS; } -- cgit