summaryrefslogtreecommitdiff
path: root/source4/lib/tdr
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-02 14:45:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:25 -0500
commit52d995feb0565b458e026063e3bf3c259846bc8e (patch)
treede81d5609c0324082484fd4df56ef7704d36f7f1 /source4/lib/tdr
parentc70405cd728c28c1c21c9e1e97279c2e4e9bcc91 (diff)
downloadsamba-52d995feb0565b458e026063e3bf3c259846bc8e.tar.gz
samba-52d995feb0565b458e026063e3bf3c259846bc8e.tar.bz2
samba-52d995feb0565b458e026063e3bf3c259846bc8e.zip
r9959: Fix bug where data offset was incorrect after parsing element with
[charset] (This used to be commit b17478229e8e9220858fcc85a19ec751450f969d)
Diffstat (limited to 'source4/lib/tdr')
-rw-r--r--source4/lib/tdr/tdr.c19
1 files changed, 2 insertions, 17 deletions
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;
}