aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcp-etsi.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-01-16 21:51:16 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-01-16 21:51:16 +0000
commit6ba6ea6533edddcbf055f90b26eabead7fd1c94a (patch)
treea39ba0a6807cb47218fd75e4634dc1fc1d6d0733 /epan/dissectors/packet-dcp-etsi.c
parente7d64a962ff27a6d9eddfc1c181c095ea58d5f34 (diff)
don't attempt reassembly if more than 1000 consecutive fragments are
missing this fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8222 svn path=/trunk/; revision=47123
Diffstat (limited to 'epan/dissectors/packet-dcp-etsi.c')
-rw-r--r--epan/dissectors/packet-dcp-etsi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c
index a253cbb1f3..970ccba24f 100644
--- a/epan/dissectors/packet-dcp-etsi.c
+++ b/epan/dissectors/packet-dcp-etsi.c
@@ -242,6 +242,9 @@ gboolean rs_correct_data(guint8 *deinterleaved, guint8 *output,
/* Don't attempt reassembly if we have a huge number of fragments. */
#define MAX_FRAGMENTS ((1 * 1024 * 1024) / sizeof(guint32))
+/* If we missed more than this number of consecutive fragments,
+ we don't attempt reassembly */
+#define MAX_FRAG_GAP 1000
static tvbuff_t *
dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
@@ -316,6 +319,12 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
proto_tree_add_text(tree, tvb , 0, -1, "[Reassembly of %d fragments not attempted]", next_fragment_we_have);
return NULL;
}
+ if (next_fragment_we_have-current_findex > MAX_FRAG_GAP) {
+ proto_tree_add_text(tree, tvb , 0, -1,
+ "[Missing %d consecutive packets. Don't attempt reassembly]",
+ next_fragment_we_have-current_findex);
+ return NULL;
+ }
for(; current_findex<next_fragment_we_have; current_findex++) {
frag = fragment_add_seq_check (dummytvb, 0, pinfo, seq,
dcp_fragment_table, dcp_reassembled_table,