diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-04-09 14:36:26 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-04-09 12:38:04 +0000 |
commit | c2a1d8feed0791478629c8dba775ec5f3bda7653 (patch) | |
tree | c224f56e5e36002414977001a3dcb79f3da5e3f2 /asn1/ldap/ldap.cnf | |
parent | 5fa267e870364902864d67f9ea297e52e6029cd7 (diff) | |
download | wireshark-c2a1d8feed0791478629c8dba775ec5f3bda7653.tar.gz |
Replace deprecated API tvb_length -> tvb_reported_length
Change-Id: I9c8bf6beec47afb901e492723b335a28a24f455e
Reviewed-on: https://code.wireshark.org/review/8004
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1/ldap/ldap.cnf')
-rw-r--r-- | asn1/ldap/ldap.cnf | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 464342248b..d0aab8b523 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -67,7 +67,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_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA); name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); if(name){ @@ -172,7 +172,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_reported_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 @@ -210,7 +210,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_reported_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))) {*/ @@ -218,7 +218,7 @@ gint32 tag; /* * This is a raw GSS-API token. */ - if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) { + if (parameter_tvb && (tvb_reported_length(parameter_tvb) > 0)) { call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree); } } @@ -274,7 +274,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_reported_length(parameter_tvb)>=7) && (!tvb_memeql(parameter_tvb, 0, "NTLMSSP", 7))){ call_dissector(ntlmssp_handle, parameter_tvb, actx->pinfo, tree); break; @@ -282,14 +282,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_reported_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_reported_length(parameter_tvb) > 0)) call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree); } break; @@ -308,7 +308,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_reported_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA); if(hf_index == hf_ldap_baseObject) { /* this is search - put it on the scanline */ @@ -461,7 +461,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_reported_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)) { @@ -470,14 +470,14 @@ ldap_conv_info_t *ldap_info; /* do the default thing */ %(DEFAULT_BODY)s - len = tvb_length_remaining(next_tvb, 0); + len = tvb_reported_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_reported_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA); proto_item_set_text(actx->created_item, "AttributeValue: %%s", string); } } @@ -690,14 +690,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_reported_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_reported_length_remaining(tvb, offset); #.FN_BODY BindResponse/_untag/matchedDN tvbuff_t *new_tvb=NULL; @@ -705,7 +705,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_reported_length(new_tvb)>=7) && (!tvb_memeql(new_tvb, 0, "NTLMSSP", 7))){ /* make sure the protocol op comes first */ @@ -772,7 +772,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_reported_length_remaining(tvb, offset); len=remaining>0 ? remaining : 0; } |