aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gbcs.c
diff options
context:
space:
mode:
authorMartin Boye Petersen <martinboyepetersen@gmail.com>2019-01-27 23:41:05 +0100
committerAnders Broman <a.broman58@gmail.com>2019-01-28 06:14:00 +0000
commit4dbb26fdb8de6bc634c0d405a57b803bf2815c1d (patch)
treed0c56799ca358f3f443dbf838d9f8699951e02a8 /epan/dissectors/packet-gbcs.c
parent58861b07ee7026038753222c9e878f32114d2059 (diff)
GBCS: Increment offset before subtracting length
Fixed issue with incorrect item end being set for the grouping header if it includes a KA certificate. Length was subtracted first (set to 0) and therefor the offset would remain unchanged. Change-Id: I23ab1620613af821ee5a41fc29b83e6d4b08430e Reviewed-on: https://code.wireshark.org/review/31764 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gbcs.c')
-rwxr-xr-xepan/dissectors/packet-gbcs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gbcs.c b/epan/dissectors/packet-gbcs.c
index 44e02f8dfc..b9c019b528 100755
--- a/epan/dissectors/packet-gbcs.c
+++ b/epan/dissectors/packet-gbcs.c
@@ -1294,35 +1294,35 @@ dissect_gbcs_message_grouping_header(tvbuff_t *tvb, packet_info *pinfo, proto_tr
proto_tree_add_item_ret_uint(other_info_tree, hf_gbcs_message_grouping_header_message_code,
tvb, *offset, 2, ENC_BIG_ENDIAN, &message_code);
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, val_to_str_ext_const(message_code, &gbcs_message_code_names_ext, "Unknown Use Case"));
- other_info_len -= 2;
*offset += 2;
+ other_info_len -= 2;
if (other_info_len > 0) {
proto_tree_add_item(other_info_tree, hf_gbcs_message_grouping_header_supplementary_remote_party_id,
tvb, *offset, 8, ENC_BIG_ENDIAN);
- other_info_len -= 8;
*offset += 8;
+ other_info_len -= 8;
}
if (other_info_len > 0) {
proto_tree_add_item(other_info_tree, hf_gbcs_message_grouping_header_supplementary_remote_party_counter,
tvb, *offset, 8, ENC_BIG_ENDIAN);
- other_info_len -= 8;
*offset += 8;
+ other_info_len -= 8;
}
if (other_info_len > 0) {
proto_tree_add_item(other_info_tree, hf_gbcs_message_grouping_header_supplementary_originator_counter,
tvb, *offset, 8, ENC_BIG_ENDIAN);
- other_info_len -= 8;
*offset += 8;
+ other_info_len -= 8;
}
if (other_info_len > 0) {
proto_tree_add_item(other_info_tree, hf_gbcs_message_grouping_header_supplementary_remote_party_ka_certificate,
tvb, *offset, other_info_len, ENC_NA);
- other_info_len -= other_info_len;
*offset += other_info_len;
+ other_info_len -= other_info_len;
}
proto_item_set_end(other_info_ti, tvb, *offset);