Added
Link Here
|
1 |
Index: source/rpc_parse/parse_rpc.c |
2 |
=================================================================== |
3 |
--- rpc_parse/parse_rpc.c (revision 842) |
4 |
+++ rpc_parse/parse_rpc.c (working copy) |
5 |
@@ -1189,7 +1189,8 @@ |
6 |
/******************************************************************* |
7 |
reads or writes an RPC_AUTH_NETSEC_CHK structure. |
8 |
********************************************************************/ |
9 |
-BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk, |
10 |
+BOOL smb_io_rpc_auth_netsec_chk(const char *desc, int auth_len, |
11 |
+ RPC_AUTH_NETSEC_CHK * chk, |
12 |
prs_struct *ps, int depth) |
13 |
{ |
14 |
if (chk == NULL) |
15 |
@@ -1198,10 +1199,19 @@ |
16 |
prs_debug(ps, depth, desc, "smb_io_rpc_auth_netsec_chk"); |
17 |
depth++; |
18 |
|
19 |
- prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)); |
20 |
- prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)); |
21 |
- prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)); |
22 |
- prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)); |
23 |
+ if ( !prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)) ) |
24 |
+ return False; |
25 |
+ |
26 |
+ if ( !prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)) ) |
27 |
+ return False; |
28 |
+ |
29 |
+ if ( !prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)) ) |
30 |
+ return False; |
31 |
+ |
32 |
+ if ( auth_len == RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN ) { |
33 |
+ if ( !prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)) ) |
34 |
+ return False; |
35 |
+ } |
36 |
|
37 |
return True; |
38 |
} |