cheery / node-udev

Bindings to libudev
35 stars 31 forks source link

Avoid segfaulting when udev_monitor_receive_device returns NULL #29

Closed zvin closed 5 years ago

zvin commented 5 years ago

I am getting segfaults on add and remove events on a compute module 3.

According to the udev_monitor_receive_device docs:

On failure, NULL is returned.

cheery commented 5 years ago

Thanks. I'll add it tomorrow and bump the minor version up maybe?

Programs that do crash will crash on this anyway.

ke 12. kesäk. 2019 klo 19.09 Alexis Svinartchouk notifications@github.com kirjoitti:

I am getting segfaults on add and remove events on a compute module 3.

According to the udev_monitor_receive_device docs https://www.freedesktop.org/software/systemd/man/udev_monitor_receive_device.html :

On failure, NULL is returned.


You can view, comment on, or merge this pull request online at:

https://github.com/cheery/node-udev/pull/29 Commit Summary

  • Avoid segfaulting when udev_monitor_receive_device returns NULL

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cheery/node-udev/pull/29?email_source=notifications&email_token=AAJIXPAOK6KOWPLCU5AWSNTP2ENTXA5CNFSM4HXKRYDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZDLR2Q, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJIXPE64KEFX5SIXSBLGNDP2ENTXANCNFSM4HXKRYDA .

cheery commented 5 years ago

It was a bit later than I planned for, but you can find these changes in the 0.6.0 package at npm now.