summaryrefslogtreecommitdiff
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-12-16 16:21:41 +0000
committerEvan Huus <eapache@gmail.com>2012-12-16 16:21:41 +0000
commit18538f6c8a907c9b2a9b3ee0f607bcb23fbe28cf (patch)
tree3da24cc210d950b264fd35a32f3572a353d0fdae /epan/tvbuff.c
parent0d40765d0899a7bdba41731c8870528460dc8d53 (diff)
downloadwireshark-18538f6c8a907c9b2a9b3ee0f607bcb23fbe28cf.tar.gz
DISSECTOR_ASSERT on member_length when composing a disjoint tvb in order to
avoid an infinite recursion. More robust handling of the error case in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8097 but doesn't fix the actual bug (which is that either DHCP or BOOTP is building an invalid tvbuff). svn path=/trunk/; revision=46564
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index f6056a3002..a3037a0eee 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -1044,6 +1044,7 @@ composite_memcpy(tvbuff_t *tvb, guint8* target, guint abs_offset, size_t abs_len
retval = compute_offset_length(member_tvb->length, member_tvb->reported_length, abs_offset - composite->start_offsets[i], -1,
&member_offset, &member_length, NULL);
DISSECTOR_ASSERT(retval);
+ DISSECTOR_ASSERT(member_length);
tvb_memcpy(member_tvb, target, member_offset, member_length);
abs_offset += member_length;