summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcfzs.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 15:00:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 15:00:51 +0000
commite27759aa56732ec1423a104333c1d88f5ddd7efb (patch)
tree489b146d4effcec44f246eb0b4d1c9f269c94b43 /epan/dissectors/packet-fcfzs.c
parentAdding upstream version 4.2.4. (diff)
downloadwireshark-e27759aa56732ec1423a104333c1d88f5ddd7efb.tar.xz
wireshark-e27759aa56732ec1423a104333c1d88f5ddd7efb.zip
Adding upstream version 4.2.5.upstream/4.2.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-fcfzs.c')
-rw-r--r--epan/dissectors/packet-fcfzs.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c
index 4cbf519..82a55f7 100644
--- a/epan/dissectors/packet-fcfzs.c
+++ b/epan/dissectors/packet-fcfzs.c
@@ -116,9 +116,13 @@ dissect_fcfzs_zoneset(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int o
len = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_fcfzs_zonesetnmlen, tvb, offset,
1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset+4,
+ offset += 4;
+ proto_tree_add_item(tree, hf_fcfzs_zonesetname, tvb, offset,
len, ENC_ASCII);
- offset += 4 + len + (4-(len % 4));
+ offset += len;
+ /* Fill Bytes */
+ if (len % 4)
+ offset += 4 - (len % 4);
/* Number of zones */
@@ -131,9 +135,13 @@ dissect_fcfzs_zoneset(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int o
len = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_fcfzs_zonenmlen, tvb, offset,
1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset+4,
+ offset += 4;
+ proto_tree_add_item(tree, hf_fcfzs_zonename, tvb, offset,
len, ENC_ASCII);
- offset += 4 + len + (4-(len % 4));
+ offset += len;
+ /* Fill Bytes */
+ if (len % 4)
+ offset += 4 - (len % 4);
nummbrs = tvb_get_ntohl(tvb, offset);
proto_tree_add_item(tree, hf_fcfzs_nummbrentries, tvb, offset,