From 0fcca6f0c8392b16ebfefdc69086d02e1dba2c7e Mon Sep 17 00:00:00 2001 From: Mirko Parthey Date: Tue, 23 Aug 2016 16:29:57 +0200 Subject: ISAKMP: fix DOI field read size Read 4 bytes from the packet instead of 1 because that is the correct size of the DOI field. Reference: RFC 2408 Change-Id: I5745363811bb46af307a925d688ec36cfb29984b Reviewed-on: https://code.wireshark.org/review/17271 Reviewed-by: Alexis La Goutte Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-isakmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-isakmp.c') diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index c8e097fb46..7668fb475a 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -4433,7 +4433,7 @@ dissect_notif(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, proto_t offset_end = offset + length; if (isakmp_version == 1) { - proto_tree_add_item(tree, hf_isakmp_notify_doi, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_isakmp_notify_doi, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; length -= 4; } @@ -4585,7 +4585,7 @@ dissect_delete(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isak guint8 spi_size; if (isakmp_version == 1) { - proto_tree_add_item(tree, hf_isakmp_delete_doi, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tree, hf_isakmp_delete_doi, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; length -= 4; } -- cgit v1.2.3