diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-04-14 07:59:25 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-04-14 06:24:30 +0000 |
commit | 444cdf5f6b6994706347f703b248bb1507c38888 (patch) | |
tree | 772a56056e6bc669059043900a412369a2df18fc | |
parent | bf515f599056d73165f0c421f11de495842afeec (diff) |
Bluetooth: ATT: Add missing offset calculations
Change-Id: Ia0fe426bff7d48a45d915a18aa679bb8978d2fca
Reviewed-on: https://code.wireshark.org/review/1095
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r-- | epan/dissectors/packet-btatt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c index 1b76b06dbb..b2f3101d8b 100644 --- a/epan/dissectors/packet-btatt.c +++ b/epan/dissectors/packet-btatt.c @@ -252,8 +252,8 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U offset += 2; proto_tree_add_item(st, hf_btatt_uuid16, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - if( tvb_length_remaining(tvb, offset) > 0) - proto_tree_add_item(st, hf_btatt_value, tvb, offset, -1, ENC_NA); + proto_tree_add_item(st, hf_btatt_value, tvb, offset, -1, ENC_NA); + offset = tvb_reported_length(tvb); break; case 0x07: /* Find By Type Value Response */ @@ -332,6 +332,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U case 0x0d: /* Read Blob Response */ case 0x0f: /* Multiple Read Response */ proto_tree_add_item(st, hf_btatt_value, tvb, offset, -1, ENC_NA); + offset = tvb_reported_length(tvb); break; case 0x0c: /* Read Blob Request */ @@ -393,6 +394,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U proto_tree_add_item(st, hf_btatt_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(st, hf_btatt_value, tvb, offset, -1, ENC_NA); + offset = tvb_reported_length(tvb); break; case 0x16: /* Prepare Write Request */ @@ -404,6 +406,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U proto_tree_add_item(st, hf_btatt_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(st, hf_btatt_value, tvb, offset, -1, ENC_NA); + offset = tvb_reported_length(tvb); break; case 0x18: /* Execute Write Request */ |