linux-capture: Fix potential null pointer dereference
Use dstr_cmp() instead of strcmp() to prevent null pointer dereferences. This code for this source has way too many pointers.
This commit is contained in:
parent
089ba29961
commit
5a1fca9347
1 changed files with 1 additions and 1 deletions
|
|
@ -310,7 +310,7 @@ xcb_window_t xcomp_find_window(xcb_connection_t *conn, Display *disp, const char
|
|||
|
||||
struct dstr cwname = xcomp_window_name(conn, disp, cwin);
|
||||
struct dstr cwcls = xcomp_window_class(conn, cwin);
|
||||
bool found = strcmp(wname, cwname.array) == 0 && strcmp(wcls, cwcls.array) == 0;
|
||||
bool found = dstr_cmp(&cwname, wname) == 0 && dstr_cmp(&cwcls, wcls) == 0;
|
||||
|
||||
dstr_free(&cwname);
|
||||
dstr_free(&cwcls);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue