[dwm] Bug in applyrules(Client *c) (hg tip)

From: Nibble <nibble_AT_develsec.org>
Date: Mon, 17 Mar 2008 23:08:22 +0100

Hi there,

If you have a rule with a NULL value in the "title" field you will fall into a
loop.

So there is a bug in the function applyrules(Client *c) line 262,

if(strstr(c->name, r->title)
        || (ch.res_class && r->class && strstr(ch.res_class, r->class))
        || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))

should be:

if(c->name && r->title && strstr(c->name, r->title)
        || (ch.res_class && r->class && strstr(ch.res_class, r->class))
         || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))

Kind regards,
Nibble
Received on Mon Mar 17 2008 - 23:09:11 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:26:51 UTC