From 607371490974b434882ecacef3477ca3f5beb80f Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 19 May 2018 10:49:51 +0000 Subject: [PATCH] Permit "(", ")", ":", and "/" in USB string descriptors. This way we can properly show descriptors with URLs in them. Reviewed by: hselasky@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/dev/usb/usb_request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index 98af1964aa4..29d9368ac41 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -1155,7 +1155,11 @@ usbd_req_get_string_any(struct usb_device *udev, struct mtx *mtx, char *buf, *s == '+' || *s == ' ' || *s == '.' || - *s == ',') { + *s == ',' || + *s == ':' || + *s == '/' || + *s == '(' || + *s == ')') { /* allowed */ s++; }