In "tvb_ensure_bytes_remaining()", throw ReportedBoundsError, not
BoundsError, if the offset is just past the end of the reported data (because we're ensuring that there actually *is* a byte there, and, even according to the reported length, it isn't). svn path=/trunk/; revision=9444
This commit is contained in:
parent
982b7a3f2b
commit
129de02c79
|
@ -9,7 +9,7 @@
|
|||
* the data of a backing tvbuff, or can be a composite of
|
||||
* other tvbuffs.
|
||||
*
|
||||
* $Id: tvbuff.c,v 1.55 2003/12/23 21:22:00 guy Exp $
|
||||
* $Id: tvbuff.c,v 1.56 2003/12/24 23:28:17 guy Exp $
|
||||
*
|
||||
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
|
@ -596,7 +596,7 @@ tvb_ensure_length_remaining(tvbuff_t *tvb, gint offset)
|
|||
* There aren't any bytes available, so throw the appropriate
|
||||
* exception.
|
||||
*/
|
||||
if (abs_offset > tvb->reported_length)
|
||||
if (abs_offset >= tvb->reported_length)
|
||||
THROW(ReportedBoundsError);
|
||||
else
|
||||
THROW(BoundsError);
|
||||
|
|
Loading…
Reference in New Issue