diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-03-07 18:17:07 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-03-07 18:17:07 +0000 |
commit | 2a143bd29adb7584eea623c6bbb6e98c414852ab (patch) | |
tree | 4f271a9d4dc4aeedb1327fd6e3e48b61a0c1285d /epan/dissectors/packet-ptp.c | |
parent | cd2c726c8c43d1e94dcfadaf6db30c8731b20da9 (diff) | |
download | wireshark-2a143bd29adb7584eea623c6bbb6e98c414852ab.tar.gz |
IEEE1588 PTPv2 over IPv6 -> Padding issue. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6836
svn path=/trunk/; revision=41403
Diffstat (limited to 'epan/dissectors/packet-ptp.c')
-rw-r--r-- | epan/dissectors/packet-ptp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index 08d5d7f1cc..a02090c191 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -2471,7 +2471,8 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hf_ptp_v2_an_timesource, tvb, PTP_V2_AN_TIMESOURCE_OFFSET, 1, ENC_BIG_ENDIAN); tlv_total_length = 0; - while (tvb_reported_length_remaining(tvb, PTP_V2_AN_TLV_OFFSET + tlv_total_length) >= 2) + /* XXX It seems like at least 4 bytes must reamain to have a tlv_type and tlv_length */ + while (tvb_reported_length_remaining(tvb, PTP_V2_AN_TLV_OFFSET + tlv_total_length) >= 4) { /* There are TLV's to be processed */ tlv_type = tvb_get_ntohs (tvb, PTP_V2_AN_TLV_OFFSET+tlv_total_length+PTP_V2_AN_TLV_TYPE_OFFSET); |