mirror of https://gerrit.osmocom.org/simtrace2
host: properly zero-initialize interface match structures
This can lead to some fields not properly zero-initialized, fooling our matching code into the application having requested certain fields to match ('0' is usually assumed to be unspecified). Change-Id: I304d55b584e37d9dccb75b24057bb682f799beb2
This commit is contained in:
parent
7a450041bf
commit
94cc319b8e
|
@ -549,6 +549,7 @@ int main(int argc, char **argv)
|
|||
|
||||
do {
|
||||
struct usb_interface_match _ifm, *ifm = &_ifm;
|
||||
memset(ifm, 0, sizeof(*ifm));
|
||||
ifm->vendor = vendor_id;
|
||||
ifm->product = product_id;
|
||||
ifm->configuration = config_id;
|
||||
|
|
|
@ -303,6 +303,7 @@ int main(int argc, char **argv)
|
|||
do {
|
||||
if (transp->udp_fd < 0) {
|
||||
struct usb_interface_match _ifm, *ifm = &_ifm;
|
||||
memset(ifm, 0, sizeof(*ifm));
|
||||
ifm->vendor = vendor_id;
|
||||
ifm->product = product_id;
|
||||
ifm->configuration = config_id;
|
||||
|
|
Loading…
Reference in New Issue