Rastislav Galia wrote:
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 254if (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
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
patchfile
Description: application/java-vm