Commit 9fe40c9f authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

wineusb.sys: Fix a potential buffer overflow in add_usb_device().

name needs to be able to hold 15 characters plus an unsigned int, potentially up to 10 characters even if it is unlikely, plus the trailing nul character. Signed-off-by: 's avatarFrancois Gouget <fgouget@free.fr> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cb1d0c91
...@@ -94,7 +94,7 @@ static void add_usb_device(libusb_device *libusb_device) ...@@ -94,7 +94,7 @@ static void add_usb_device(libusb_device *libusb_device)
DEVICE_OBJECT *device_obj; DEVICE_OBJECT *device_obj;
UNICODE_STRING string; UNICODE_STRING string;
NTSTATUS status; NTSTATUS status;
WCHAR name[20]; WCHAR name[26];
int ret; int ret;
libusb_get_device_descriptor(libusb_device, &device_desc); libusb_get_device_descriptor(libusb_device, &device_desc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment