As reported by Coverity, the return value for XGetWindowAttributes is usually checked in many places, because it is a good practice to ensure that it did work, but it was not checked when called in the function 'wClientCheckProperty'.
Signed-off-by: Christophe CURIS <[email protected]> --- src/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index 99ed445..9af875c 100644 --- a/src/client.c +++ b/src/client.c @@ -483,8 +483,8 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event) int foo; unsigned bar; - XGetWindowAttributes(dpy, wwin->client_win, &attribs); - wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar); + if (XGetWindowAttributes(dpy, wwin->client_win, &attribs) != 0) + wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar); /* TODO: should we check for consistency of the current * size against the new geometry hints? */ } -- 2.1.4 -- To unsubscribe, send mail to [email protected].
