Fix up a length check.

svn path=/trunk/; revision=16245
This commit is contained in:
Gerald Combs 2005-10-16 14:23:56 +00:00
parent 7ce6f2c971
commit cf7474a92e
1 changed files with 2 additions and 0 deletions

View File

@ -2416,6 +2416,8 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* now we know, that RPC was shorter */
if (rpc_item) {
if (offset < 0)
THROW(ReportedBoundsError);
tvb_ensure_bytes_exist(tvb, offset, 0);
proto_item_set_end(rpc_item, tvb, offset);
}