forked from osmocom/wireshark
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
This commit is contained in:
parent
7c5cf7fee0
commit
a0729a25dd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue