aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rfid-pn532-hci.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-rfid-pn532-hci.c')
-rw-r--r--epan/dissectors/packet-rfid-pn532-hci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-rfid-pn532-hci.c b/epan/dissectors/packet-rfid-pn532-hci.c
index fe81c5b130..c1d555ed5a 100644
--- a/epan/dissectors/packet-rfid-pn532-hci.c
+++ b/epan/dissectors/packet-rfid-pn532-hci.c
@@ -81,7 +81,7 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
return 0;
usb_conv_info = (usb_conv_info_t *)data;
- length = tvb_length_remaining(tvb, offset);
+ length = tvb_captured_length_remaining(tvb, offset);
if (length < 6) return offset;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN532_HCI");
@@ -91,7 +91,7 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
main_tree = proto_item_add_subtree(main_item, ett_pn532_hci);
length = 0;
- while (tvb_length_remaining(tvb, length) >= 2 && tvb_get_ntohs(tvb, length) != 0x00FF) {
+ while (tvb_captured_length_remaining(tvb, length) >= 2 && tvb_get_ntohs(tvb, length) != 0x00FF) {
length += 1;
}
if (length) {
@@ -179,9 +179,9 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
}
length = 0;
- if (tvb_length_remaining(tvb, offset) == 1) {
+ if (tvb_captured_length_remaining(tvb, offset) == 1) {
length = 1;
- } else while (tvb_length_remaining(tvb, offset + length) >= 2 && tvb_get_ntohs(tvb, offset + length) != 0x00FF) {
+ } else while (tvb_captured_length_remaining(tvb, offset + length) >= 2 && tvb_get_ntohs(tvb, offset + length) != 0x00FF) {
length += 1;
}
if (length) {
@@ -189,9 +189,9 @@ dissect_pn532_hci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
offset += length;
}
- if (tvb_length_remaining(tvb, offset)) {
- proto_tree_add_item(main_tree, hf_ignored, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA);
- offset += tvb_length_remaining(tvb, offset);
+ if (tvb_captured_length_remaining(tvb, offset)) {
+ proto_tree_add_item(main_tree, hf_ignored, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
+ offset += tvb_captured_length_remaining(tvb, offset);
}
return offset;