Skip to content

Conversation

Timac
Copy link

@Timac Timac commented Sep 25, 2017

I have seen several crashes on macOS 10.12.6 caused by the fact that IOHIDManagerCopyDevices() returned NULL. Calling CFSetGetCount() on a NULL CFSetRef causes a crash. The fix consists of checking if the CFSetRef is not NULL before using it. Here is a backtrace of a crash:

0x00007fffd04a5118 CFSetGetCount + 24
0x000000010c15147f hid_enumerate (hid.c:427)
0x000000010c151acc hid_open (hid.c:529)

…IOHIDManagerCopyDevices() returned NULL. Calling CFSetGetCount() on a NULL CFSetRef causes a crash. The fix consists of checking if the CFSetRef is not NULL before using it. Here is a backtrace of a crash:

0x00007fffd04a5118 CFSetGetCount + 24
0x000000010c15147f hid_enumerate (hid.c:427)
0x000000010c151acc hid_open (hid.c:529)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant