Subject: New member anounces diagnosed bug !

From: Rastislav Galia <[email-masked]>
Date: Sat, 21 Sep 2002 09:26:56 +0200 (CEST)

Hello, I am new to fvwm-workers. I hope this is the right place to post 
technical details.

So - in latest cvs source in fvwm/modules/FvwmTaskBar/Start.c there is bug 
in case no Start button attributes are defined in config file. In that 
case list of Start buttons is empty, causing null pointer dereference and 
crash of the module. The bug was introduced recently (Sep 12-th). I did 
patch to solve it by inserting this statement to line 254

  if (First_Start_Button->isStartButton == TRUE)
  {
    if (First_Start_Button->buttonCaption == NULL)
      UpdateString(&(First_Start_Button->buttonCaption), "Start");
    if (First_Start_Button->buttonIconFileName == NULL)
      UpdateString(&(First_Start_Button->buttonIconFileName), "mini-start.xpm");
  }

Anyway, maybe this is not what is intended, but assumption of 
non-emptyness of the list is all around the code.

/Rastjo

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Ben Mathews <[email-masked]>
Date: Sat, 21 Sep 2002 10:55:47 -0400

> non-emptyness of the list is all around the code.

The attached patch will solve this problem.

The first start button is not actually allocated until a startbutton 
attribute is passed to StartButtonParseConfig.  At present, a 
startbutton must be present, whether or not attributes are specified in 
the fvwm2rc.  Adding the following lines to StartButtonInit solves the 
problem by setting the necessary attributes to some default values.

// if no start button params were specified, trick the program into
// thinking that they were
if (First_Start_Button == NULL)
{
   StartButtonParseConfig("*FvwmTaskBarStartName Start");
   StartButtonParseConfig("*FvwmTaskBarStartMenu RootMenu");
   StartButtonParseConfig("*FvwmTaskBarStartIcon mini.start.xpm");
}

Ben

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Sep 2002 13:01:09 +0200

> The attached patch will solve this problem.

Applied.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]