diff --git a/host/src/simtrace2-cardem-pcsc.c b/host/src/simtrace2-cardem-pcsc.c index 0eaf2c3d..dabe693a 100644 --- a/host/src/simtrace2-cardem-pcsc.c +++ b/host/src/simtrace2-cardem-pcsc.c @@ -587,7 +587,8 @@ int main(int argc, char **argv) ifm->configuration = config_id; ifm->interface = if_num; ifm->altsetting = altsetting; - ifm->addr = addr; + if (addr > 0 && addr < 256) + ifm->addr = addr; if (path) osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); transp->udp_fd = -1; diff --git a/host/src/simtrace2-tool.c b/host/src/simtrace2-tool.c index b0fac6c1..fdf0d566 100644 --- a/host/src/simtrace2-tool.c +++ b/host/src/simtrace2-tool.c @@ -309,7 +309,8 @@ int main(int argc, char **argv) ifm->configuration = config_id; ifm->interface = if_num; ifm->altsetting = altsetting; - ifm->addr = addr; + if (addr > 0 && addr < 256) + ifm->addr = addr; if (path) osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm);