]> git.samba.org - samba.git/commitdiff
libndr: store a subcontext buffer size in ndr_push_subcontext_start.
authorGünther Deschner <gd@samba.org>
Mon, 14 Dec 2009 14:33:32 +0000 (15:33 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 Feb 2010 11:28:11 +0000 (12:28 +0100)
Guenther
(cherry picked from commit 05347754ee61f06466d6d9b7f390001992f793ce)

librpc/ndr/libndr.h
librpc/ndr/ndr.c

index 6274b20c49d3a7d12b354dfe0ba5627377936e8a..ca920ec068be489cfed78abeecb187d59dd669c4 100644 (file)
@@ -85,6 +85,7 @@ struct ndr_push {
        uint32_t offset;
 
        uint32_t relative_base_offset;
+       uint32_t relative_end_offset;
        struct ndr_token_list *relative_base_list;
 
        struct ndr_token_list *switch_list;
index 5f4ce594154b6530e988129122fc7e427fa87719..19620acc56f15b119dcf36aef50912ecdbf125f2 100644 (file)
@@ -596,6 +596,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
        if (size_is > 0) {
                NDR_CHECK(ndr_push_zero(subndr, size_is));
                subndr->offset = 0;
+               subndr->relative_end_offset = size_is;
        }
 
        *_subndr = subndr;