Don't hand zero-length UUIDs to print_numeric_uuid().

It returns a null pointer if you do.

Change-Id: I3bc934a576dba261d1e71767978e3789a892e728
Reviewed-on: https://code.wireshark.org/review/10590
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-09-20 12:04:52 -07:00
parent 8626bb4cbb
commit 821ebb81f1
2 changed files with 4 additions and 1 deletions

View File

@ -863,7 +863,8 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
if (!dissector_try_uint_new(rfcomm_dlci_dissector_table, (guint32) dlci,
next_tvb, pinfo, tree, TRUE, rfcomm_data)) {
if (!dissector_try_string(bluetooth_uuid_table, print_numeric_uuid(&service_info->uuid),
if (service_info->uuid.size == 0 ||
!dissector_try_string(bluetooth_uuid_table, print_numeric_uuid(&service_info->uuid),
next_tvb, pinfo, tree, rfcomm_data)) {
decode_by_dissector = find_proto_by_channel(dlci >> 1);
if (rfcomm_channels_enabled && decode_by_dissector) {

View File

@ -1123,6 +1123,8 @@ get_specified_uuid(wmem_array_t *uuid_array)
p_uuid = (bluetooth_uuid_t *) wmem_array_index(uuid_array, i_uuid);
if (p_uuid->size == 16) /* CustomUUID (UUID128) is always ok */
break;
if (p_uuid->size == 0)
continue;
if (dissector_get_string_handle(bluetooth_uuid_table, print_numeric_uuid(p_uuid)))
break;
}