From ecc9b011c5c0a1c5b7b9efdadafe2d41794c4036 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 5 Jun 2018 10:32:46 +0200 Subject: SYNC: fix decoding of PDU type 3 format Bug: 14823 Change-Id: I143c57d9d81ff8510d60b8a0d9f2daea78c33e0b Reviewed-on: https://code.wireshark.org/review/28032 Petri-Dish: Pascal Quantin Reviewed-by: Pascal Quantin --- epan/dissectors/packet-sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-sync.c') diff --git a/epan/dissectors/packet-sync.c b/epan/dissectors/packet-sync.c index aa370121f0..82b0f3c125 100644 --- a/epan/dissectors/packet-sync.c +++ b/epan/dissectors/packet-sync.c @@ -91,7 +91,7 @@ dissect_sync(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ col_set_str(pinfo->cinfo, COL_INFO, "MBMS synchronisation protocol"); /* Ugly, but necessary to get the correct length for type 3 */ - packet_nr = tvb_get_ntohs(tvb, offset+3); + packet_nr = tvb_get_ntohs(tvb, offset+3) + 1; /* The length varies depending on PDU type */ switch (type) { @@ -128,7 +128,7 @@ dissect_sync(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ offset += 2; /* Octet 4 - Packet Number */ - proto_tree_add_uint(sync_tree, hf_sync_packet_nr, tvb, offset, 2, packet_nr+1); + proto_tree_add_uint(sync_tree, hf_sync_packet_nr, tvb, offset, 2, packet_nr); offset += 2; /* Octet 6 - Elapsed Octet Counter */ -- cgit v1.2.3