windows: Allow GUID with and without trailing zeroes
authorCraig Hutchinson <54269136+CraigHutchinson@users.noreply.github.com>
Tue, 8 Jun 2021 18:03:43 +0000 (20:03 +0200)
committerNathan Hjelm <hjelmn@google.com>
Fri, 9 Jul 2021 03:52:14 +0000 (21:52 -0600)
commita03058723a03080456814d5212c3caceacc58ae9
tree4cb34f8bcc09d24af9945af7eb7ad21b64d57798
parent68289d0d038b42e177d50fec9e26b8175d302627
windows: Allow GUID with and without trailing zeroes

Improve the GUID length check to accommodate the cases where the GUID
string fetched from registry does not have a trailing zero, or if a
multi-string entry, one or two trailing zeroes.

Closes #927

Signed-off-by: Craig Hutchinson <54269136+CraigHutchinson@users.noreply.github.com>
[Tormod: Use correct types and simplify comparisons]
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb/os/windows_winusb.c
libusb/version_nano.h