Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing ptr checks after malloc/calloc calls #702

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

Megamouse
Copy link
Contributor

  • Do not call CloseHandle in hid_open_path if device_handle is NULL
  • Return errors if malloc calls fail
  • Return errors if calloc calls fail (new_hid_device returns NULL)

@Megamouse
Copy link
Contributor Author

UPS... rebased to the wrong master :)
will push the correct stuff again in a minute

windows/hid.c Outdated Show resolved Hide resolved
windows/hid.c Outdated Show resolved Hide resolved
windows/hid.c Outdated Show resolved Hide resolved
windows/hid.c Outdated Show resolved Hide resolved
mac/hid.c Outdated Show resolved Hide resolved
@Youw Youw merged commit 750bf20 into libusb:master Oct 3, 2024
14 checks passed
@Megamouse Megamouse deleted the errors branch October 3, 2024 22:08
@mcuee mcuee added Windows Related to Windows backend libusb Related to libusb backend labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libusb Related to libusb backend Windows Related to Windows backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants