From a0729a25dd4daa0b2527100d1ce792879fd28760 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Thu, 30 Nov 2000 03:24:16 +0000 Subject: 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 --- epan/tvbuff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan') 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 * @@ -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) -- cgit v1.2.3