[dwm] Bug in idxoftag (hg tip)

From: Nibble <nibble_AT_develsec.org>
Date: Thu, 20 Mar 2008 13:03:23 +0100

Hi there,

I think there is a bug in the function idxoftag(const char *t), line 863
exactly. In the hg tip that line looks like:

        for(i = 0; (i < LENGTH(tags)) && strcmp(tags[i], t); i++);

and should be, eg:

        for(i = 0; t && (i < LENGTH(tags)) && strcmp(tags[i], t); i++);

due to t could be NULL (modkey+0, modkey+shift+0), so strcmp would crash dwm.

Kind regards,
Nibble
Received on Thu Mar 20 2008 - 13:03:45 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:27:37 UTC