summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/drsuapi.h2
-rw-r--r--librpc/gen_ndr/ndr_drsuapi.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h
index 8bd80fd331..f5425055b0 100644
--- a/librpc/gen_ndr/drsuapi.h
+++ b/librpc/gen_ndr/drsuapi.h
@@ -787,7 +787,7 @@ struct drsuapi_DsGetMembershipsRequest1 {
uint32_t count;/* [range(1,10000)] */
struct drsuapi_DsReplicaObjectIdentifier **info_array;/* [unique,size_is(count)] */
uint32_t flags;
- enum drsuapi_DsMembershipType type;
+ enum drsuapi_DsMembershipType type;/* [range(1,7)] */
struct drsuapi_DsReplicaObjectIdentifier *domain;/* [unique] */
};
diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c
index 8aab9e4561..240076665d 100644
--- a/librpc/gen_ndr/ndr_drsuapi.c
+++ b/librpc/gen_ndr/ndr_drsuapi.c
@@ -4992,6 +4992,9 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pu
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr, NDR_SCALARS, &r->type));
+ if (r->type < 1 || r->type > 7) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
if (_ptr_domain) {
NDR_PULL_ALLOC(ndr, r->domain);