aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ldap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-12-18 18:18:50 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-12-18 18:18:50 +0000
commit3cd5c2fa8a9c442c13f99ba6866dbcd90dca60b2 (patch)
treec7614acb350c4d451b97e9f1839636faf92dfd41 /packet-ldap.c
parentec3ab21edccbd743f3a08070f9e796fdd7e08a03 (diff)
From Ronnie Sahlberg: if the GSSAPI token is empty, don't dissect it.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9344 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ldap.c')
-rw-r--r--packet-ldap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet-ldap.c b/packet-ldap.c
index 29129c8c47..c431abee4c 100644
--- a/packet-ldap.c
+++ b/packet-ldap.c
@@ -3,7 +3,7 @@
*
* See RFC 1777 (LDAP v2), RFC 2251 (LDAP v3), and RFC 2222 (SASL).
*
- * $Id: packet-ldap.c,v 1.70 2003/12/04 08:13:27 sahlberg Exp $
+ * $Id: packet-ldap.c,v 1.71 2003/12/18 18:18:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1067,6 +1067,10 @@ static void dissect_ldap_request_bind(ASN1_SCK *a, proto_tree *tree,
(a->offset + length) - token_offset, "GSS-API Token");
gtree = proto_item_add_subtree(gitem, ett_ldap_gssapi_token);
}
+ if(length==0){
+ /* for GSSAPI the third pdu will sometimes be "empty" */
+ return;
+ }
available_length = tvb_length_remaining(tvb, token_offset);
reported_length = tvb_reported_length_remaining(tvb, token_offset);
g_assert(available_length >= 0);