aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bootp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-bootp.c')
-rw-r--r--epan/dissectors/packet-bootp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index ca3cf52c83..362b2556ef 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -2301,9 +2301,9 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item
unsigned int offset = 0;
tvb_composite_finalize(rfc3396_dns_domain_search_list.tvb_composite);
- while (offset < tvb_length(rfc3396_dns_domain_search_list.tvb_composite)) {
+ while (offset < tvb_captured_length(rfc3396_dns_domain_search_list.tvb_composite)) {
/* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
- consumedx = get_dns_name(rfc3396_dns_domain_search_list.tvb_composite, offset, tvb_length(rfc3396_dns_domain_search_list.tvb_composite), 0, &dns_name);
+ consumedx = get_dns_name(rfc3396_dns_domain_search_list.tvb_composite, offset, tvb_captured_length(rfc3396_dns_domain_search_list.tvb_composite), 0, &dns_name);
if (rfc3396_dns_domain_search_list.total_number_of_block == 1) {
/* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
proto_tree_add_string(v_tree, hf_bootp_option_dhcp_dns_domain_search_list_fqdn, tvb, optoff + offset, consumedx, dns_name);
@@ -2360,14 +2360,14 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item
switch (enc) {
case RFC_3361_ENC_FQDN: {
unsigned int consumedx = 0;
- if (tvb_length(rfc3396_sip_server.tvb_composite) < 3) {
- expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite));
+ if (tvb_captured_length(rfc3396_sip_server.tvb_composite) < 3) {
+ expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3 (len = %u)", tvb_captured_length(rfc3396_sip_server.tvb_composite));
break;
}
- while (offset < tvb_length(rfc3396_sip_server.tvb_composite)) {
+ while (offset < tvb_captured_length(rfc3396_sip_server.tvb_composite)) {
/* use the get_dns_name method that manages all techniques of RFC 1035 (compression pointer and so on) */
- consumedx = get_dns_name(rfc3396_sip_server.tvb_composite, offset, tvb_length(rfc3396_sip_server.tvb_composite), 1 /* ignore enc */, &dns_name);
+ consumedx = get_dns_name(rfc3396_sip_server.tvb_composite, offset, tvb_captured_length(rfc3396_sip_server.tvb_composite), 1 /* ignore enc */, &dns_name);
if (rfc3396_sip_server.total_number_of_block == 1) {
/* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
@@ -2382,21 +2382,21 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item
break;
}
case RFC_3361_ENC_IPADDR:
- if (tvb_length(rfc3396_sip_server.tvb_composite) < 5) {
- expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite));
+ if (tvb_captured_length(rfc3396_sip_server.tvb_composite) < 5) {
+ expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5 (len = %u)", tvb_captured_length(rfc3396_sip_server.tvb_composite));
break;
}
/* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */
- if ((tvb_length(rfc3396_sip_server.tvb_composite) - 1) & 3) {
+ if ((tvb_captured_length(rfc3396_sip_server.tvb_composite) - 1) & 3) {
if (rfc3396_sip_server.total_number_of_block == 1)
- expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_length(rfc3396_sip_server.tvb_composite));
+ expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_captured_length(rfc3396_sip_server.tvb_composite));
else
expert_add_info_format(pinfo, vti, &ei_bootp_bad_length,
"length isn't a multiple of 4 plus 1 (len = %u). For your information with RFC 3396, the length is the length sum of all options 120 into this BOOTP packet.",
- tvb_length(rfc3396_sip_server.tvb_composite));
+ tvb_captured_length(rfc3396_sip_server.tvb_composite));
break;
}
- while (offset < tvb_length(rfc3396_sip_server.tvb_composite)) {
+ while (offset < tvb_captured_length(rfc3396_sip_server.tvb_composite)) {
if (rfc3396_sip_server.total_number_of_block == 1) {
/* RFC 3396 is not used, so we can easily link the fqdn with v_tree. */
proto_tree_add_item(v_tree, hf_bootp_option_sip_server_address, rfc3396_sip_server.tvb_composite, offset, 4, ENC_BIG_ENDIAN);