Re: [dwm] Bug in idxoftag (hg tip)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Thu, 20 Mar 2008 13:49:49 +0100

On Thu, Mar 20, 2008 at 01:03:23PM +0100, Nibble wrote:
> 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.

You are right! Thanks for this hint.

Kind regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Thu Mar 20 2008 - 13:49:49 UTC

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