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:30:23 +0000 (12:30 +0100)
Guenther
(cherry picked from commit 05347754ee61f06466d6d9b7f390001992f793ce)

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

index 27aeec52e213f0ac50b5f01ec2bd932bbf79543d..00f4c3e50a8eed1b5b646932b25f3fd500fa2542 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 15510d62162678bae46b372613e1a0a766b965c1..171e50b8c3a628f86d79bf5d2e52c30a7d4f1777 100644 (file)
@@ -578,6 +578,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;