proto.c: allow calling proto_item_add_bitmask_tree() with a length set to 0

This is required for the flags from packet-frame.c

Bug: 12536
Change-Id: I60bfe671687bcd3a9b5c997ba62bed563e890548
Reviewed-on: https://code.wireshark.org/review/15945
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Pascal Quantin 2016-06-15 14:50:03 -07:00 committed by Michael Mann
parent c3190adc12
commit fb38049f4d
1 changed files with 1 additions and 1 deletions

View File

@ -8846,7 +8846,7 @@ proto_item_add_bitmask_tree(proto_item *item, tvbuff_t *tvb, const int offset,
guint64 tmpval;
header_field_info *hf;
if (len <= 0 || len > 8)
if (len < 0 || len > 8)
g_assert_not_reached();
bitshift = (8 - (guint)len)*8;
available_bits = G_GUINT64_CONSTANT(0xFFFFFFFFFFFFFFFF) >> bitshift;