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: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2021-08-22 18:19:35 +02:00 committed by Alexandre Julliard
parent cb1d0c913d
commit 9fe40c9f58
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ static void add_usb_device(libusb_device *libusb_device)
DEVICE_OBJECT *device_obj;
UNICODE_STRING string;
NTSTATUS status;
WCHAR name[20];
WCHAR name[26];
int ret;
libusb_get_device_descriptor(libusb_device, &device_desc);