aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJeff Morriss <morriss@ulticom.com>2014-04-04 12:01:31 -0400
committerJeff Morriss <jeff.morriss.ws@gmail.com>2014-04-06 17:34:04 +0000
commit6328f6eb12a47fdf3c6aab3a1dee87a118f2235c (patch)
tree9c088c58e01f9ffbb840a41454689ab6551ba707 /epan
parente60ed4fc304c05bb8063d23c8a4032b62f9fadb7 (diff)
Add a couple more in_error_pkt checks.
Don't attempt reassembly and squash an expert info when we're in an error packet. Change-Id: I7d19e4ab7add78829bf1e28ad92dce3a7431c37d Reviewed-on: https://code.wireshark.org/review/964 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sctp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 66cf02fc36..2381a5fb8b 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -2581,7 +2581,7 @@ find_fragment(guint32 tsn, guint16 stream_id, guint16 stream_seq_num)
}
-static sctp_fragment*
+static sctp_fragment *
add_fragment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 tsn,
guint16 stream_id, guint16 stream_seq_num, guint8 b_bit, guint8 e_bit)
{
@@ -2590,6 +2590,10 @@ add_fragment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 tsn,
sctp_frag_be *beginend, *last_beginend;
frag_key *key;
+ /* Don't try to do reassembly on error packets */
+ if (pinfo->flags.in_error_pkt)
+ return NULL;
+
/* lookup message. if not found, create it */
msg = find_message(stream_id, stream_seq_num);
@@ -4128,7 +4132,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
}
length_item = proto_tree_add_uint(chunk_tree, hf_chunk_length, chunk_tvb, CHUNK_LENGTH_OFFSET, CHUNK_LENGTH_LENGTH, length);
- if (length > reported_length) {
+ if (length > reported_length && !pinfo->flags.in_error_pkt) {
expert_add_info_format(pinfo, length_item, &ei_sctp_chunk_length_bad, "Chunk length (%d) is longer than remaining data (%d) in the packet.", length, reported_length);
/* We'll almost certainly throw an exception shortly... */
}