proto: report dissector bug in proto_item_add_bitmask_tree.

It's illegal to call this function without fields. If that happens
we are hitting a dissector bug: report it.

Fix: #17115.
This commit is contained in:
Dario Lombardo 2020-12-29 17:42:57 +01:00 committed by AndersBroman
parent b5c93beda0
commit cd30f2434e
1 changed files with 3 additions and 0 deletions

View File

@ -11582,6 +11582,9 @@ proto_item_add_bitmask_tree(proto_item *item, tvbuff_t *tvb, const int offset,
gint bit_offset;
gint no_of_bits;
if (!*fields)
REPORT_DISSECTOR_BUG("Illegal call of proto_item_add_bitmask_tree without fields");
if (len < 0 || len > 8)
g_assert_not_reached();
/**