aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-01-15 16:51:55 +0000
committerEvan Huus <eapache@gmail.com>2013-01-15 16:51:55 +0000
commitb1ac6585bc5e2be9a71c9b72d228cc46d8b27b4b (patch)
tree7aa6fa092da2724c07814ed1750ecd897c6b0505 /epan/dissectors
parent1a93ee33454a2fc9e55bec398efbeb9ad7901169 (diff)
Don't run past the end of a fragment array, either in the loop or by putting a
useless sentinel in. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8213 svn path=/trunk/; revision=47098
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-dcp-etsi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c
index 7d6609e317..a253cbb1f3 100644
--- a/epan/dissectors/packet-dcp-etsi.c
+++ b/epan/dissectors/packet-dcp-etsi.c
@@ -291,13 +291,11 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* make a list of the findex (offset) numbers of the fragments we have */
fd = fragment_get(pinfo, seq, dcp_fragment_table);
- for (fd_head = fd; fd_head != NULL; fd_head = fd_head->next) {
+ for (fd_head = fd; fd_head != NULL && fragments < fcount; fd_head = fd_head->next) {
if(fd_head->data) {
got[fragments++] = fd_head->offset; /* this is the findex of the fragment */
}
}
- /* put a sentinel at the end */
- got[fragments++] = fcount;
/* have we got enough for Reed Solomon to try to correct ? */
if(fragments>=rx_min) { /* yes, in theory */
guint i,current_findex;