aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-packetbb.c
diff options
context:
space:
mode:
authorFrancois Schneider <francois.schneider@airbus.com>2016-02-11 23:01:00 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-02-12 07:54:21 +0000
commite81ea525655e3c61aaea939283f5beae64e77873 (patch)
tree9560398a3d64b956811fcd1612f95edd89ee3427 /epan/dissectors/packet-packetbb.c
parent41d734ec67217bb289f35f7497e26c13c2bf092f (diff)
packetbb: Fix the default value for end-index
RFC5444 ยง5.4.1 specifies that for address block TLVs: end-index := <num-addr>-1 when both thassingleindex and thasmultiindex = 0. It was incorrectly initialized to <num-addr> when <num-addr>!=0 (i.e for address block TLVs). Change-Id: I4a78f263ffb122c0d6c0b54b4e8d1d6d525353e0 Reviewed-on: https://code.wireshark.org/review/13911 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-packetbb.c')
-rw-r--r--epan/dissectors/packet-packetbb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-packetbb.c b/epan/dissectors/packet-packetbb.c
index 3604c9aed4..0f2773b5e5 100644
--- a/epan/dissectors/packet-packetbb.c
+++ b/epan/dissectors/packet-packetbb.c
@@ -181,7 +181,7 @@ static int dissect_pbb_tlvblock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
tlvFlags = tvb_get_guint8(tvb, offset++);
indexStart = 0;
- indexEnd = addrCount;
+ indexEnd = addrCount ? (addrCount - 1) : 0;
tlvExtType = 0;
if ((tlvFlags & TLV_HAS_TYPEEXT) != 0) {