Add DISSECTOR_ASSERT() before dereferencing a possible NULL pointer

svn path=/trunk/; revision=30404
This commit is contained in:
Kovarththanan Rajaratnam 2009-10-08 15:01:25 +00:00
parent a8ca8d1815
commit 30cb2b9448
1 changed files with 2 additions and 0 deletions

View File

@ -517,6 +517,8 @@ tvb_new_subset(tvbuff_t *backing, gint backing_offset, gint backing_length, gint
guint subset_tvb_offset;
guint subset_tvb_length;
DISSECTOR_ASSERT(backing && backing->initialized);
THROW_ON(reported_length < -1, ReportedBoundsError);
check_offset_length(backing->length, backing->reported_length, backing_offset, backing_length,