danvd / wlroots-eglstreams

A modular Wayland compositor library with EGLStreams support
MIT License
105 stars 11 forks source link

Possible NULL dereference at render/egl.c #23

Closed git-bruh closed 3 years ago

git-bruh commented 3 years ago

Hi, there is a possible NULL dereference of currentDeviceFile at line 309 of render/egl.c if eglQueryDeviceStringEXT fails. Was trying to figure out why sway kept segfaulting, so i built wlroots with debug symbols, added a null check which allowed it to continue and show an EGL warning that i had wrong perms on /dev/dri/* which helped me fix my issue.�

danvd commented 3 years ago

Hi @git-bruh, thank you. Added a check

git-bruh commented 3 years ago

Another one here if drmGetVersion() fails: https://github.com/danvd/wlroots-eglstreams/blob/b9f5db0e0d4946465a9eb6ecf19f542630ca30ca/backend/drm/drm.c#L1682

danvd commented 3 years ago

Thanks, fixed

danvd commented 3 years ago

@git-bruh, I'm closing this. Please reopen if something else left.