vendor: pull in USB Windows fixes
This commit is contained in:
4
vendor/github.com/karalabe/usb/appveyor.yml
generated
vendored
4
vendor/github.com/karalabe/usb/appveyor.yml
generated
vendored
@@ -22,8 +22,8 @@ environment:
|
||||
|
||||
install:
|
||||
- rmdir C:\go /s /q
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.12.6.windows-%GOARCH%.zip
|
||||
- 7z x go1.12.6.windows-%GOARCH%.zip -y -oC:\ > NUL
|
||||
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.12.9.windows-%GOARCH%.zip
|
||||
- 7z x go1.12.9.windows-%GOARCH%.zip -y -oC:\ > NUL
|
||||
- go version
|
||||
- gcc --version
|
||||
|
||||
|
4
vendor/github.com/karalabe/usb/hidapi/windows/hid.c
generated
vendored
4
vendor/github.com/karalabe/usb/hidapi/windows/hid.c
generated
vendored
@@ -74,6 +74,8 @@ extern "C" {
|
||||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -428,7 +430,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
||||
if (str) {
|
||||
len = strlen(str);
|
||||
cur_dev->path = (char*) calloc(len+1, sizeof(char));
|
||||
strncpy(cur_dev->path, str, sizeof(cur_dev->path));
|
||||
strncpy(cur_dev->path, str, len+1);
|
||||
cur_dev->path[len] = '\0';
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user