Don't generate a "dissector bug" warning in cases where a dissector calls
proto_tree_add_*(tree, tvb, offset, 0, ...); and "offset" is greater than the length remaining in the tvbuff. svn path=/trunk/; revision=14014
This commit is contained in:
parent
f16afe28a9
commit
8b95cd38d5
|
@ -2124,7 +2124,7 @@ alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
|||
/* XXX - what to do, if we don't have a tvb? */
|
||||
if(tvb) {
|
||||
length_remaining = tvb_length_remaining(tvb, start);
|
||||
if (item_length < 0 || length_remaining < item_length)
|
||||
if (item_length < 0 || (item_length > 0 && (length_remaining < item_length)))
|
||||
item_length = length_remaining;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue