diff options
author | Adam Mitz <mitza@objectcomputing.com> | 2021-08-23 11:50:03 -0500 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-08-25 07:15:28 +0000 |
commit | 1089bd47f8b3ba3756fe7b220394d53e920ac059 (patch) | |
tree | 81d53982ab0b0c44474b18c7c1b63c910fcc87cc /epan | |
parent | 7bd16e0dd9d120abc3f64c1bad25b829986a11e9 (diff) |
RTPS: fixed expected size of fragment number set
The size of this submessage is 8 + the number of 32-bit ints
needed for the value of the num_bits field to be represented
in the bitmap.
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-rtps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index c0ae71811f..212fe79fa7 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -5646,7 +5646,7 @@ static int rtps_util_add_fragment_number_set(proto_tree *tree, packet_info *pinf * message match what is here. If not re-decode it as 64-bit. */ num_bits = tvb_get_guint32(tvb, offset+4, encoding); - expected_size = (((num_bits / 8) + 3) / 4) * 4 + 8; + expected_size = ((num_bits + 31) / 32) * 4 + 8; if (expected_size == section_size) { base = (guint64)tvb_get_guint32(tvb, offset, encoding); base_size = 4; |