diff options
-rw-r--r-- | libusb/os/windows_winusb.c | 2 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c index 1e9e89a..1dd7af7 100644 --- a/libusb/os/windows_winusb.c +++ b/libusb/os/windows_winusb.c @@ -1636,7 +1636,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_ // https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryvalueexa#remarks // - "string may not have been stored with the proper terminating null characters" // - "Note that REG_MULTI_SZ strings could have two terminating null characters" - if ((reg_type == REG_SZ && size >= sizeof(guid_string) - sizeof(char)) + if ((reg_type == REG_SZ && size >= sizeof(guid_string) - sizeof(char)) || (reg_type == REG_MULTI_SZ && size >= sizeof(guid_string) - 2 * sizeof(char))) { if (nb_guids == guid_size) { new_guid_list = realloc((void *)guid_list, (guid_size + GUID_SIZE_STEP) * sizeof(void *)); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 1edc6c8..ff6e2ad 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11736 +#define LIBUSB_NANO 11737 |