diff options
author | Francois Schneider <francois.schneider@airbus.com> | 2016-02-11 23:01:00 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-02-12 07:54:21 +0000 |
commit | e81ea525655e3c61aaea939283f5beae64e77873 (patch) | |
tree | 9560398a3d64b956811fcd1612f95edd89ee3427 /epan | |
parent | 41d734ec67217bb289f35f7497e26c13c2bf092f (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')
-rw-r--r-- | epan/dissectors/packet-packetbb.c | 2 |
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) { |