diff options
author | Anders Broman <anders.broman@ericsson.com> | 2008-08-01 11:20:50 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2008-08-01 11:20:50 +0000 |
commit | 37969b91b153e2614155892d2724569200551462 (patch) | |
tree | 75168f80e61bb7cfc64a9de2c8340b24379fedf7 /asn1 | |
parent | 21381b2f37ebbc0cb95ce22053057c4af6bb8a38 (diff) |
From Yaniv Kaul:
( I edited the template files)
Failure to dissect long SASL wrapped LDAP response.
svn path=/trunk/; revision=25890
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/ldap/packet-ldap-template.c | 5 | ||||
-rw-r--r-- | asn1/ldap/packet-ldap-template.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index b3536f03a1..2bd70b7e3c 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -1383,10 +1383,11 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ /* check for a SASL header, i.e. assume it is SASL if * 1, first four bytes (SASL length) is an integer - * with a value that must be <64k and >2 + * with a value that must be <LDAP_SASL_MAX_BUF and >2 * (>2 to fight false positives, 0x00000000 is a common * "random" tcp payload) - * (no SASL ldap PDUs are ever going to be >64k in size?) + * (SASL ldap PDUs might be >64k in size, which is why + * LDAP_SASL_MAX_BUF is used - defined in packet-ldap.h) * * 2, we must have a conversation and the auth type must * be LDAP_AUTH_SASL diff --git a/asn1/ldap/packet-ldap-template.h b/asn1/ldap/packet-ldap-template.h index 75850cfbe9..a181b90891 100644 --- a/asn1/ldap/packet-ldap-template.h +++ b/asn1/ldap/packet-ldap-template.h @@ -79,6 +79,8 @@ #define LDAP_MOD_DELETE 1 #define LDAP_MOD_REPLACE 2 +#define LDAP_SASL_MAX_BUF 4*64*1024 + typedef struct ldap_call_response { gboolean is_request; guint32 req_frame; |