Some dissectors apparently call proto_tree_add_*() with a null tvb.
This makes tvb_ensure_bytes_exist() throw a fit, so just throw an exception instead. svn path=/trunk/; revision=14212
This commit is contained in:
parent
338bf987f6
commit
a80ebce3f2
|
@ -2235,7 +2235,9 @@ alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
|||
item_length = length_remaining;
|
||||
}
|
||||
}
|
||||
tvb_ensure_bytes_exist(tvb, start, item_length);
|
||||
if (item_length < 0) {
|
||||
THROW(ReportedBoundsError);
|
||||
}
|
||||
}
|
||||
|
||||
FIELD_INFO_NEW(fi);
|
||||
|
|
Loading…
Reference in New Issue