On Sun 19.Apr'09 at 21:29:12 +0200, Samir SAADA wrote:
> The first patch is an attempt to correct this bug. I did test for a
> maximum of 1000 workspaces, feel free to try more :)
Nice!
> fixing workspace limit segfault
> {
> - char buf[1024], *pos;
> + char buf[MAX_WORKSPACES*(MAX_WORKSPACENAME_WIDTH+1)], *pos;
It is more or less obvious where the problem was from looking at your
patch (wmaker keeps a huge string containing all workspace names
together, right? :-), and when the sum of their name lengths was
bigger than 1024 then a buffer overflow occured.
It would be nicer if your commit message contained an explanation
though. Furthermore, why the limit of workspaces was around 80?
A name of the form 'Workspace XX' (the default) contains 12 bytes,
and 12 x 80 = 960, or something like that...
--
To unsubscribe, send mail to [email protected].