diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 428b2937b1..1d4575b2f3 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -440,7 +440,7 @@ show_reported_bounds_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, - "[Unreassembled Packet%s]", + "[Unreassembled Packet%s] ", pinfo->noreassembly_reason); item = proto_tree_add_protocol_format(tree, proto_unreassembled, tvb, 0, 0, "[Unreassembled Packet%s: %s]", diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index e57002e95d..91f47f9e7a 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -60,6 +60,7 @@ #include #include #include +#include #define LT(x, y) ((gint32)((x) - (y)) < 0) @@ -2622,12 +2623,14 @@ dissect_fragmented_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree /* add fragement to list of known fragments. returns NULL if segment is a duplicate */ fragment = add_fragment(payload_tvb, pinfo, chunk_tree, tsn, stream_id, stream_seq_num, b_bit, e_bit); - if (fragment) new_tvb = fragment_reassembly(payload_tvb, fragment, pinfo, chunk_tree, stream_id, stream_seq_num); + if (fragment) + new_tvb = fragment_reassembly(payload_tvb, fragment, pinfo, chunk_tree, stream_id, stream_seq_num); /* pass reassembled data to next dissector, if possible */ - if (new_tvb) return dissect_payload(new_tvb, pinfo, tree, ppi); + if (new_tvb) + return dissect_payload(new_tvb, pinfo, tree, ppi); - /* no reasemmbly done, do nothing */ + /* no reassembly done, do nothing */ return TRUE; } @@ -2740,14 +2743,38 @@ dissect_data_chunk(tvbuff_t *chunk_tvb, * almost certainly not understand the data. */ if (b_bit) - return dissect_payload(payload_tvb, pinfo, tree, payload_proto_id); + { + gboolean retval; + + /* + * If this particular fragment happens to get a ReportedBoundsError + * exception (which in fact we expect it to since it's a fragment), + * don't stop dissecting chunks within this frame. + * + * If it gets a BoundsError, we can stop, as there's nothing more to + * see, so we just re-throw it. + */ + TRY { + retval = dissect_payload(payload_tvb, pinfo, tree, payload_proto_id); + } + CATCH(BoundsError) { + RETHROW; + } + CATCH(ReportedBoundsError) { + show_reported_bounds_error(payload_tvb, pinfo, tree); + } + ENDTRY; + + return retval; + } /* else */ return FALSE; } /* if unordered set stream_seq_num to 0 for easier handling */ - if (u_bit) stream_seq_num = 0; + if (u_bit) + stream_seq_num = 0; /* start reassembly */ return dissect_fragmented_payload(payload_tvb, pinfo, tree, chunk_tree, tsn, payload_proto_id, stream_id, stream_seq_num, b_bit, e_bit);