aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-spnego.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-25 11:43:47 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-25 11:43:47 +0000
commit34230c4c8542b2447083ed14927a0e41093c520d (patch)
treeb0cf7883525d6d86e61abc30e1bbcafae7842801 /epan/dissectors/packet-spnego.c
parenta2157976bc5e3f04aba419df364ad010656c7533 (diff)
microsoft does not use a confounder for spnego when using DNS/TSIG
they use an additional confounder everywhere else (as it seems) but not for DNS/TSIG git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16894 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-spnego.c')
-rw-r--r--epan/dissectors/packet-spnego.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 7cf1433553..58e87c4633 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -1296,13 +1296,19 @@ dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U
* extra 8 bytes of "Random confounder" after the checksum.
* It certainly confounds code expecting all Kerberos 5
* GSS_Wrap() tokens to look the same....
+ *
+ * The exception is DNS/TSIG where there is no such confounder
+ * so we need to test here if there are more bytes in our tvb or not.
+ * -- ronnie
*/
- if (sgn_alg == KRB_SGN_ALG_HMAC) {
- proto_tree_add_item(tree, hf_spnego_krb5_confounder, tvb, offset, 8,
+ if (tvb_length_remaining(tvb, offset)) {
+ if (sgn_alg == KRB_SGN_ALG_HMAC) {
+ proto_tree_add_item(tree, hf_spnego_krb5_confounder, tvb, offset, 8,
TRUE);
- offset += 8;
- }
+ offset += 8;
+ }
+ }
/*
* Return the offset past the checksum, so that we know where
@@ -1590,7 +1596,7 @@ void proto_register_spnego(void) {
"", HFILL }},
/*--- End of included file: packet-spnego-hfarr.c ---*/
-#line 1005 "packet-spnego-template.c"
+#line 1011 "packet-spnego-template.c"
};
/* List of subtrees */
@@ -1611,7 +1617,7 @@ void proto_register_spnego(void) {
&ett_spnego_InitialContextToken,
/*--- End of included file: packet-spnego-ettarr.c ---*/
-#line 1014 "packet-spnego-template.c"
+#line 1020 "packet-spnego-template.c"
};
/* Register protocol */