From 45406f5cffcda7c2fbc44670d0643275f30b1e1a Mon Sep 17 00:00:00 2001 From: AndersBroman Date: Thu, 3 Mar 2016 13:33:55 +0100 Subject: [PATCH] [PPCAP] SCTP association ID IE is alwas 16 octets long including padding. Change-Id: I1d381cb7f60f0ec57494becddc529cafb5d23052 Reviewed-on: https://code.wireshark.org/review/14323 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-ppcap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c index fa59e0543c..ef0d8b1d73 100644 --- a/epan/dissectors/packet-ppcap.c +++ b/epan/dissectors/packet-ppcap.c @@ -509,11 +509,9 @@ dissect_ppcap_sctp_assoc(tvbuff_t *tvb _U_, proto_tree * tree _U_, int offset) proto_tree_add_item(tree, hf_ppcap_sctp_assoc, tvb, offset, length, ENC_ASCII | ENC_NA); - if (length % 4) - length = length + (4 - (length % 4)); - offset += length; + /* The string can be 1 -15 characters long but the IE is padded to 16 bytes*/ - return offset; + return offset + 16; } /* Dissecting the function Payload Data to call the protocol that based upon the type decided in the Payload Type */