diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
commit | 0f157e7d6c4be48f213ea022cb2d6d1316c423c8 (patch) | |
tree | ff4ad271b50a39e23d5a50a54f4bff37342cdc1c /epan/dissectors/packet-tipc.c | |
parent | Adding debian version 4.2.4-1. (diff) | |
download | wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.tar.xz wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.zip |
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-tipc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index fb41797d..a556ed6a 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -1099,13 +1099,16 @@ dissect_tipc_v2_internal_msg(tvbuff_t *tipc_tvb, proto_tree *tipc_tree, packet_i /* the bearer instance string is padded with \0 to the next word boundry */ b_inst_strlen = tvb_strsize(tipc_tvb, offset); offset += b_inst_strlen; - if ((padlen = (4-b_inst_strlen%4)) > 0) { + if ((padlen = ((b_inst_strlen%4)?(4-(b_inst_strlen%4)):0)) > 0) { proto_tree_add_bytes_format_value(tipc_tree, hf_tipcv2_padding, tipc_tvb, offset, padlen, NULL, "%d byte%c", padlen, (padlen!=1?'s':0)); offset += padlen; } if ((offset-msg_size) > 0) { + int filler_len; + + filler_len = tvb_reported_length_remaining(tipc_tvb, offset); proto_tree_add_bytes_format_value(tipc_tree, hf_tipcv2_filler_mtu_discovery, tipc_tvb, offset, -1, NULL, - "%d byte%c", tvb_reported_length_remaining(tipc_tvb, offset), (padlen!=1?'s':0)); + "%d byte%c", filler_len, (filler_len!=1?'s':0)); } } break; |