diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-11-10 07:44:47 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-11-10 07:44:47 +0000 |
commit | 2f2b6808e25c8ef926f4ad6d3cb4d7b239c30ad3 (patch) | |
tree | 9a4c7b43125bc3fef5496b17af623f22f00bf843 /packet-ldap.c | |
parent | 870ce51feecf003312d59c12b58f18736c2e7f63 (diff) |
Not all LDAP PDUs are aligned to the start of a TCP segment.
If we failed to dissect the GSS-SPNEGO blob it probably means that the segment
is somewhere in the middle of an LDAP PDU.
Just bail out and stop dissecting the PDU instead of aborting ethereal completely
using g_assert() since this is not really a pathological error, its just something that can and will happen normally.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8925 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ldap.c')
-rw-r--r-- | packet-ldap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packet-ldap.c b/packet-ldap.c index f72e08eb29..d466bbb0dd 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.68 2003/11/07 04:03:44 sahlberg Exp $ + * $Id: packet-ldap.c,v 1.69 2003/11/10 07:44:46 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2044,7 +2044,13 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gtree = proto_item_add_subtree(gitem, ett_ldap_gssapi_token); } len = call_dissector(gssapi_wrap_handle, next_tvb, pinfo, gtree); - g_assert(len != 0); /* GSS_Wrap() dissectors can't reject data */ + /* + * if len is 0 it probably mean that we got a PDU that is not + * aligned to the start of the segment. + */ + if(len==0){ + return; + } if (gitem != NULL) proto_item_set_len(gitem, len); |