[wmii] WMII Menu bug with non-existent programs

From: Adam Gleave <nard.list_AT_gmail.com>
Date: Mon, 19 Dec 2005 11:09:19 -0800

If you select a non-existent program (for instance, type ctrl+alt+p
and then type adf - persuming no program begins with adf) wmiimenu
will segfault. This is due to dereferencing a null pointer in
update_offset. A gdb backtrace is attatched.

But I found in update_offsets some interesting code:

if (!i)
    return;

If I remember the C spec correctly, uninitialized local variables are
undefined; so it seems odd to test an undefined value. The only use I
can think of is if update_offset's stack is 'always' set up in a way
for i to actually represent something, which would be an.. ermm..
intriguing way of passing data.

Received on Mon Dec 19 2005 - 20:09:21 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:39 UTC