summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_dce.h2
-rw-r--r--source3/rpc_parse/parse_rpc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index 68cc55bf31..abc85035ea 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -231,7 +231,7 @@ typedef struct rpc_context {
/* RPC_BIND_REQ - ms req bind */
typedef struct rpc_bind_req_info {
RPC_HDR_BBA bba;
- uint32 num_contexts; /* the number of contexts */
+ uint8 num_contexts; /* the number of contexts */
RPC_CONTEXT *rpc_context;
} RPC_HDR_RB;
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index ef5c230d2d..3c10975876 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -463,10 +463,10 @@ BOOL smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int de
if(!smb_io_rpc_hdr_bba("", &rpc->bba, ps, depth))
return False;
- if(!prs_uint32("num_contexts", ps, depth, &rpc->num_contexts))
+ if(!prs_uint8("num_contexts", ps, depth, &rpc->num_contexts))
return False;
- rpc->num_contexts &= 0xff; /* Actually a 1 byte field.. */
+ /* 3 pad bytes following - will be mopped up by the prs_align in smb_io_rpc_context(). */
/* num_contexts must not be zero. */
if (rpc->num_contexts == 0)