diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2012-03-29 12:03:49 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2012-03-29 12:03:49 +0000 |
commit | 91f2f97f28c3cf02576bd78456a77ea1348087c3 (patch) | |
tree | cb0b8e35f645a8c0fd48838f77ac1cedfd13926c /asn1/ldap | |
parent | 378d03900965a694c92b0e724b7ae24b746ea6c6 (diff) |
Don't try to convert AttributeValue to string if having a ldap_name dissector.
Prefix the converted printable string correctly with 'AttributeValue: '.
svn path=/trunk/; revision=41823
Diffstat (limited to 'asn1/ldap')
-rw-r--r-- | asn1/ldap/ldap.cnf | 26 | ||||
-rw-r--r-- | asn1/ldap/packet-ldap-template.c | 2 |
2 files changed, 12 insertions, 16 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 010c2dd5e0..4ae2f88d62 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -470,25 +470,21 @@ ldap_conv_info_t *ldap_info; /* if we have an attribute type that isn't binary see if there is a better dissector */ if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree)) { - offset = old_offset; + offset = old_offset; - /* do the default thing */ - %(DEFAULT_BODY)s + /* do the default thing */ + %(DEFAULT_BODY)s - } - - len = tvb_length_remaining(next_tvb, 0); - - for(i = 0; i < len; i++) - if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i))) - break; + len = tvb_length_remaining(next_tvb, 0); - if(i == len) { - string = tvb_get_ephemeral_string(next_tvb, 0, tvb_length_remaining(next_tvb, 0)); - - - proto_item_set_text(actx->created_item, "%%s", string); + for(i = 0; i < len; i++) + if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i))) + break; + if(i == len) { + string = tvb_get_ephemeral_string(next_tvb, 0, tvb_length_remaining(next_tvb, 0)); + proto_item_set_text(actx->created_item, "AttributeValue: %%s", string); + } } #.FN_BODY AuthenticationChoice VAL_PTR = &branch diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index ce2e70b6cb..7a69961ccc 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -1634,7 +1634,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 sasl_len; guint32 ldap_len; gboolean ind; - conversation_t *conversation; + conversation_t *conversation; ldap_conv_info_t *ldap_info = NULL; /* |