From 52d995feb0565b458e026063e3bf3c259846bc8e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 2 Sep 2005 14:45:40 +0000 Subject: r9959: Fix bug where data offset was incorrect after parsing element with [charset] (This used to be commit b17478229e8e9220858fcc85a19ec751450f969d) --- source4/lib/tdr/tdr.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'source4/lib/tdr') diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c index 1d859fdcd5..c16a05ecf0 100644 --- a/source4/lib/tdr/tdr.c +++ b/source4/lib/tdr/tdr.c @@ -43,23 +43,6 @@ #define TDR_SIVAL(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSIVAL(tdr->data.data,ofs,v); } else SIVAL(tdr->data.data,ofs,v); } while (0) #define TDR_SIVALS(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSIVALS(tdr->data.data,ofs,v); } else SIVALS(tdr->data.data,ofs,v); } while (0) -struct tdr_pull *tdr_pull_init(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob) -{ - struct tdr_pull *tdr = talloc_zero(mem_ctx, struct tdr_pull); - tdr->data = *blob; - return tdr; -} - -struct tdr_push *tdr_push_init(TALLOC_CTX *mem_ctx) -{ - return talloc_zero(mem_ctx, struct tdr_push); -} - -struct tdr_print *tdr_print_init(TALLOC_CTX *mem_ctx) -{ - return talloc_zero(mem_ctx, struct tdr_print); -} - /* expand the available space in the buffer to 'size' */ @@ -166,6 +149,8 @@ NTSTATUS tdr_pull_charset(struct tdr_pull *tdr, const char **v, uint32_t length, return NT_STATUS_INVALID_PARAMETER; } + tdr->offset += length * el_size; + return NT_STATUS_OK; } -- cgit