diff options
author | Gerald Combs <gerald@wireshark.org> | 2005-04-04 18:10:42 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2005-04-04 18:10:42 +0000 |
commit | 8b95cd38d5e4d9cf885e0a4c3246b5a55e32dc3a (patch) | |
tree | 82730c7c129563e831cf790243c78af9c528ca94 /epan/proto.c | |
parent | f16afe28a960c4c94ee2295bc295fc0b80987034 (diff) | |
download | wireshark-8b95cd38d5e4d9cf885e0a4c3246b5a55e32dc3a.tar.gz wireshark-8b95cd38d5e4d9cf885e0a4c3246b5a55e32dc3a.tar.bz2 wireshark-8b95cd38d5e4d9cf885e0a4c3246b5a55e32dc3a.zip |
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
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 6381218584..6602b14a2d 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -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; } } |