From 5c9963c287e20a4a4b8bbaa088328438eb4f942c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 17 Jun 2005 18:05:46 +0000 Subject: r7696: Don't try and be clever and read an 8 byte int and 3 pad bytes as a uint32 - you'll just get it wrong (as I did :-). Second attempt to fix the Apple client issues. Jeremy. (This used to be commit d2aa5bc7aaa9fe11fa4748f99e4ba49be08aa639) --- source3/rpc_parse/parse_rpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_parse') 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) -- cgit