aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-11-30 03:24:16 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-11-30 03:24:16 +0000
commita0729a25dd4daa0b2527100d1ce792879fd28760 (patch)
tree2eaa2d9409e5d52cdd1f63213d56c9fd75398886 /epan
parent7c5cf7fee008650e8e4fd32d031e83933f3bb199 (diff)
In tvb_set_reported_length(), don't assert on
reported_length <= tvb->reported_length, but throw a ReportedBoundsError if that condition is not met. svn path=/trunk/; revision=2718
Diffstat (limited to 'epan')
-rw-r--r--epan/tvbuff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 114ab545a1..2d18b9c799 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.c,v 1.10 2000/11/18 10:38:33 guy Exp $
+ * $Id: tvbuff.c,v 1.11 2000/11/30 03:24:16 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
@@ -642,7 +642,9 @@ void
tvb_set_reported_length(tvbuff_t* tvb, guint reported_length)
{
g_assert(tvb->initialized);
- g_assert(reported_length <= tvb->reported_length);
+
+ if (reported_length > tvb->reported_length)
+ THROW(ReportedBoundsError);
tvb->reported_length = reported_length;
if (reported_length < tvb->length)