proto: handle split bits covering more than 32 bits
authorPeter Wu <peter@lekensteyn.nl>
Sun, 13 May 2018 22:22:44 +0000 (00:22 +0200)
committerAnders Broman <a.broman58@gmail.com>
Mon, 14 May 2018 08:13:47 +0000 (08:13 +0000)
commit19c45892461da6f1767190c86c62dab02db8a2e3
tree8b53ef9285272bf78b1ef62cf76668ec99c920f3
parentb10dbb861457736991943fbddb13356ff6eb4c81
proto: handle split bits covering more than 32 bits

proto_tree_add_split_bits_item_ret_val can handle bits from an arbitrary
sized buffer, as long as it covers no more than 64 bits. If the
octet-aligned mask covers up to 32 bits, then this mask is also shown.
If this mask was larger than 64 bits, then undefined behavior could
occur, so check for that.

For larger masks, instead of "= GmPRS Terminal Type: Unknown (96)",
display "7 bits = GmPRS Terminal Type: Unknown (96)" instead.

Bug: 13613
Change-Id: I111cf6a0705f999e42d83bfe57ac84f414946d0b
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1158
Reviewed-on: https://code.wireshark.org/review/27517
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/proto.c