diff options
Diffstat (limited to 'asn1/ldap/ldap.cnf')
-rw-r--r-- | asn1/ldap/ldap.cnf | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index dfad13183f..d7cb4dc7e6 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -65,7 +65,7 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy" if (!parameter_tvb) return offset; - object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); + object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); name = oid_resolved_from_string(object_identifier_id); if(name){ @@ -194,7 +194,7 @@ char *mechanism = NULL; * different type and/or mechanism. */ if(!actx->pinfo->fd->flags.visited) { - mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); + mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */ /* * If the mechanism in this request is an empty string (which is @@ -232,7 +232,7 @@ gint32 tag; * All SPNEGO PDUs are of class CONSTRUCTED while * GSS PDUs are class APPLICATION */ - if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) + if (parameter_tvb && (tvb_captured_length(parameter_tvb) > 0)) call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree); } /*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/ @@ -240,7 +240,7 @@ gint32 tag; /* * This is a raw GSS-API token. */ - if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) { + if (parameter_tvb && (tvb_captured_length(parameter_tvb) > 0)) { call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree); } } @@ -296,7 +296,7 @@ ldap_conv_info_t *ldap_info; * which might not be wrapped in GSS-SPNEGO but be a raw * NTLMSSP blob */ - if ( (tvb_length(parameter_tvb)>=7) + if ( (tvb_captured_length(parameter_tvb)>=7) && (!tvb_memeql(parameter_tvb, 0, "NTLMSSP", 7))){ call_dissector(ntlmssp_handle, parameter_tvb, actx->pinfo, tree); break; @@ -304,14 +304,14 @@ ldap_conv_info_t *ldap_info; /* * This is a GSS-API token. */ - if(parameter_tvb && (tvb_length(parameter_tvb) > 0)) + if(parameter_tvb && (tvb_captured_length(parameter_tvb) > 0)) call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree); } else if (ldap_info->auth_mech != NULL && strcmp(ldap_info->auth_mech, "GSSAPI") == 0) { /* * This is a GSS-API token. */ - if(parameter_tvb && (tvb_length(parameter_tvb) > 0)) + if(parameter_tvb && (tvb_captured_length(parameter_tvb) > 0)) call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree); } break; @@ -330,7 +330,7 @@ ldap_conv_info_t *ldap_info; ldap_do_protocolop(actx->pinfo); if(parameter_tvb) - ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA); + ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA); if(hf_index == hf_ldap_baseObject) { /* this is search - put it on the scanline */ @@ -469,7 +469,7 @@ ldap_conv_info_t *ldap_info; /* first check if we have a custom attribute type configured */ if ((hf_id = get_hf_for_header (attr_type)) != NULL) - proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); + proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_captured_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); /* if we have an attribute type that isn't binary see if there is a better dissector */ else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) { @@ -478,14 +478,14 @@ ldap_conv_info_t *ldap_info; /* do the default thing */ %(DEFAULT_BODY)s - len = tvb_length_remaining(next_tvb, 0); + len = tvb_captured_length_remaining(next_tvb, 0); for(i = 0; i < len; i++) if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i))) break; if(i == len) { - string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA); + string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_captured_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA); proto_item_set_text(actx->created_item, "AttributeValue: %%s", string); } } @@ -572,7 +572,7 @@ ldap_conv_info_t *ldap_info; and_filter_string=NULL; if(tree){ - it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "and: "); + it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "and: "); tr=proto_item_add_subtree(it, ett_ldap_T_and); tree = tr; } @@ -600,7 +600,7 @@ ldap_conv_info_t *ldap_info; or_filter_string=NULL; if(tree){ - it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "or: "); + it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "or: "); tr=proto_item_add_subtree(it, ett_ldap_T_or); tree = tr; } @@ -665,7 +665,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v substring_item_any=NULL; substring_item_final=NULL; if(tree){ - it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "substring: "); + it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "substring: "); tr=proto_item_add_subtree(it, ett_ldap_SubstringFilter); tree = tr; } @@ -692,7 +692,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v } if(tree){ - it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "Filter: "); + it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "Filter: "); tr=proto_item_add_subtree(it, ett_ldap_Filter); tree = tr; } @@ -705,14 +705,14 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v ldap_do_protocolop(actx->pinfo); call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree); - offset+=tvb_length_remaining(tvb, offset); + offset+=tvb_captured_length_remaining(tvb, offset); #.FN_BODY AuthenticationChoice/ntlmsspAuth /* make sure the protocol op comes first */ ldap_do_protocolop(actx->pinfo); call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree); - offset+=tvb_length_remaining(tvb, offset); + offset+=tvb_captured_length_remaining(tvb, offset); #.FN_BODY BindResponse/_untag/matchedDN tvbuff_t *new_tvb=NULL; @@ -720,7 +720,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb); if( new_tvb - && (tvb_length(new_tvb)>=7) + && (tvb_captured_length(new_tvb)>=7) && (!tvb_memeql(new_tvb, 0, "NTLMSSP", 7))){ /* make sure the protocol op comes first */ @@ -787,7 +787,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag); otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL); } else { - gint32 remaining=tvb_length_remaining(tvb, offset); + gint32 remaining=tvb_captured_length_remaining(tvb, offset); len=remaining>0 ? remaining : 0; } |