forked from external/yambar
module/xwindow: don't crash if window doesn't have a correctly sized PID property
This commit is contained in:
parent
d264a6a067
commit
b0e384b2f3
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ update_application(struct module *mod)
|
|||
}
|
||||
|
||||
uint32_t pid;
|
||||
assert(xcb_get_property_value_length(r) == sizeof(pid));
|
||||
if (xcb_get_property_value_length(r) != sizeof(pid)) {
|
||||
free(r);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&pid, xcb_get_property_value(r), sizeof(pid));
|
||||
free(r);
|
||||
|
|
Loading…
Add table
Reference in a new issue