USB: Set address after creating interface conversation

Both bus id and device address are already known when creating interface
info on the first pass. Set the values early to prevent passing zero
initialized data to dissectors.

Change-Id: I50c748eb16e0ab39fdc84f2d7503c87ae48eeae9
Reviewed-on: https://code.wireshark.org/review/37328
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Filipe Laíns <lains@archlinux.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Tomasz Moń 2020-05-27 19:30:14 +02:00 committed by Anders Broman
parent c3e2f3cf9c
commit b036c0742e
1 changed files with 2 additions and 0 deletions

View File

@ -2313,6 +2313,8 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree,
/* Register conversation for this interface in case CONTROL messages are sent to it */
usb_trans_info->interface_info = get_usb_iface_conv_info(pinfo, interface_num);
usb_trans_info->interface_info->bus_id = usb_conv_info->bus_id;
usb_trans_info->interface_info->device_address = usb_conv_info->device_address;
alternate_setting.altSetting = alt_setting;
alternate_setting.interfaceClass = tvb_get_guint8(tvb, offset);