Skip to content

Commit

Permalink
librpc: Remove last callers of ndr_pull_get_switch_value()
Browse files Browse the repository at this point in the history
By removing this we know we do not need to worry about this list
growing without bounds.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
  • Loading branch information
abartlet committed Dec 12, 2019
1 parent 92a7c5a commit b880bda
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions librpc/ndr/ndr_drsuapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,11 @@ enum ndr_err_code ndr_push_drsuapi_DsBindInfo(struct ndr_push *ndr, int ndr_flag

enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsBindInfo *r)
{
uint32_t level;
uint32_t _flags_save = ndr->flags;
ndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64;
level = ndr_pull_get_switch_value(ndr, r);
NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
if (ndr_flags & NDR_SCALARS) {
uint32_t level = ndr_pull_steal_switch_value(ndr, r);
NDR_CHECK(ndr_pull_union_align(ndr, 4));
switch (level) {
case 24: {
Expand Down Expand Up @@ -551,25 +550,6 @@ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int ndr_flag

}
}
if (ndr_flags & NDR_BUFFERS) {
switch (level) {
case 24:
break;

case 28:
break;

case 48:
break;

case 52:
break;

default:
break;

}
}
ndr->flags = _flags_save;
return NDR_ERR_SUCCESS;
}
Expand Down

0 comments on commit b880bda

Please sign in to comment.