summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr_sec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 798d3a7cf1..5adff6b0ce 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -35,7 +35,13 @@ NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *
return NT_STATUS_OK;
}
NDR_CHECK(ndr_pull_uint32(ndr, &num_auths));
- return ndr_pull_dom_sid(ndr, ndr_flags, sid);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
+ if (sid->num_auths != num_auths) {
+ return ndr_pull_error(ndr, NDR_ERR_CONFORMANT_SIZE,
+ "Bad conformant size %u should be %u",
+ num_auths, sid->num_auths);
+ }
+ return NT_STATUS_OK;
}
/*