Fix buffer overflow when reading WM_NAME
XTextProperty doesn't guarantee the string will be null-terminated.
This commit is contained in:
parent
6eb108d3bc
commit
5076ec1586
1 changed files with 1 additions and 1 deletions
|
@ -1540,7 +1540,7 @@ map_win (Display *dpy, Window id, unsigned long sequence)
|
|||
XTextProperty tp;
|
||||
XGetTextProperty ( dpy, id, &tp, XA_WM_NAME );
|
||||
|
||||
if ( tp.value && strcmp( (const char*)tp.value, "SP" ) == 0 )
|
||||
if ( tp.value && strncmp( (char *)tp.value, "SP", tp.nitems ) == 0 )
|
||||
{
|
||||
w->isSteamPopup = True;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue