Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Make sure to not pass NULL surfaces to these wlr functions #8

Merged
merged 3 commits into from
Jun 14, 2020

Conversation

Shugyousha
Copy link
Contributor

On my machine passing NULL surfaces resulted in aborts.

I am not sure this is the right way to fix these so you should have a closer look at the issue.

Turns out that this will hit asserts that will abort dwl.
Copy link
Owner

@djpohly djpohly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the assertion landed in wlroots last week. PR looks good with the suggested updates.

dwl.c Outdated Show resolved Hide resolved
dwl.c Outdated Show resolved Hide resolved
@djpohly djpohly merged commit 63f09d1 into djpohly:master Jun 14, 2020
@djpohly
Copy link
Owner

djpohly commented Jun 14, 2020

Thanks!

@BenJarg BenJarg mentioned this pull request Nov 19, 2022
@yoandrisolis yoandrisolis mentioned this pull request Jul 8, 2023
link2xt added a commit to link2xt/dwl that referenced this pull request Nov 19, 2023
…NULL

Passing NULL to wlr_keyboard_set_keymap results in a segfault.
Example:

  Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
  0x00007ffff7e49b64 in xkb_keymap_ref () from /usr/lib/libxkbcommon.so.0
  (gdb) bt
  #0  0x00007ffff7e49b64 in xkb_keymap_ref () at /usr/lib/libxkbcommon.so.0
  djpohly#1  0x00007ffff7f06389 in wlr_keyboard_set_keymap () at /usr/lib/libwlroots.so.11
  djpohly#2  0x000055555555bc54 in createkeyboard ()
  djpohly#3  0x000055555555c283 in inputdevice ()
  djpohly#4  0x00007ffff7e8101e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0
  djpohly#5  0x00007ffff7e8101e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0
  djpohly#6  0x00007ffff7edb52c in  () at /usr/lib/libwlroots.so.11
  djpohly#7  0x00007ffff7ee44b6 in  () at /usr/lib/libwlroots.so.11
  djpohly#8  0x000055555555fe66 in main ()
sevz17 pushed a commit that referenced this pull request Nov 19, 2023
…NULL

Passing NULL to wlr_keyboard_set_keymap results in a segfault.
Example:

  Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
  0x00007ffff7e49b64 in xkb_keymap_ref () from /usr/lib/libxkbcommon.so.0
  (gdb) bt
  #0  0x00007ffff7e49b64 in xkb_keymap_ref () at /usr/lib/libxkbcommon.so.0
  #1  0x00007ffff7f06389 in wlr_keyboard_set_keymap () at /usr/lib/libwlroots.so.11
  #2  0x000055555555bc54 in createkeyboard ()
  #3  0x000055555555c283 in inputdevice ()
  #4  0x00007ffff7e8101e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0
  #5  0x00007ffff7e8101e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0
  #6  0x00007ffff7edb52c in  () at /usr/lib/libwlroots.so.11
  #7  0x00007ffff7ee44b6 in  () at /usr/lib/libwlroots.so.11
  #8  0x000055555555fe66 in main ()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants