m1dugh / native-sound-mixer

MIT License
25 stars 13 forks source link

Check for null pointer dereference #43

Closed JJ-8 closed 8 months ago

JJ-8 commented 8 months ago

Hi @m1dugh, since this issue is quite severe for our users I have already made a proposal to fix this problem. However I have NOT tested this at all since I am unable to reproduce this problem and don't have a development environment for your project. So could you verify that this fix is correctly implemented? Thank you in advance.

Change: The result of Activate should be checked. It may return NULL as described in https://learn.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdevice-activate This will prevent a null pointer dereference when the Activate function fails. Fixes #42 and see https://github.com/m1dugh/native-sound-mixer/issues/42 for details.

m1dugh commented 8 months ago

Hello, this looks good to me, thanks for the PR, sorry I couldn't make the change myself