Hi Rodolfo, Could you please have a try at the patch attached below? it may (or may not) solve the problem.
Carlos, Considering the nature of the patch, I'd suggest to include it anyway if its fits your standards. Regards, Christophe. ----- Rodolfo kix Garcia <[email protected]> a écrit : > El 31.05.2012 18:33, Carlos R. Mafra escribió: > > On Thu, 31 May 2012 at 18:03:10 +0200, Rodolfo kix Garcia wrote: > >> El 31.05.2012 17:54, Carlos R. Mafra escribió: > >> >On Thu, 31 May 2012 at 17:20:30 +0200, Rodolfo kix Garcia wrote: > >> >>Hi, > >> >> > >> >>please, can anyone using the current next brach (updated) to check > >> >>if there is a bug? > >> >> > >> >>1. Launch any application > >> >>2. Open the properties > >> >>3. Click on "Reload" > >> >> > >> >>I didn't have this problem with the debian binary, but yes with my > >> >>developer binary at /usr/local/bin. > >> > > >> >I don't see any obvious problem with clicking the "Reload" button > >> >here. > >> >What kind of problem do you see? > >> > >> Hi Carlos, > >> > >> thanks for your reply. wmaker restarts, this is the problem: > >> > >> Program received signal SIGSEGV, Segmentation fault. > > > > Ok, I definitely can't trigger it. Can you (git) bisect this? > > Hi Carlos, > > I think the problem is at commit > c82138eab959bc4f73b5c49de209188aab25b2a0 (Haroldo Santos's patch, in > cc:). > (http://repo.or.cz/w/wmaker-crm.git/commitdiff/c82138eab959bc4f73b5c49de209188aab25b2a0) > > The previous commit (wmgenmenu: Add French and Spanish translations) > don't have the problem. > > I have not time now to make a patch. I will try to check it soon (but > not today), because I spent a lot of time trying to see if my new > patches has bugs. If you (or Haroldo) can check it, perfect. I am busy > these days :-( > > Regards. > kix > -- > ||// //\\// Rodolfo "kix" Garcia > ||\\// //\\ http://www.kix.es/ > > > -- > To unsubscribe, send mail to [email protected].
From 3d9cfc23d00df6ed5d1179b900247e2f929680a2 Mon Sep 17 00:00:00 2001 From: Christophe CURIS <[email protected]> Date: Thu, 31 May 2012 20:26:09 +0200 Subject: [PATCH] Fixed possible off-by-one loops Due to variable size definitions in the structure, the 'for' loops may actually try to work on wrong data. Instead of using hard-coded value, we now simply let the compiler give us the number of element. This may (or may not) fix a crash reported by Rodolfo kix Garcia. --- src/winspector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/winspector.c b/src/winspector.c index 37ae0b2..71e9486 100644 --- a/src/winspector.c +++ b/src/winspector.c @@ -884,7 +884,7 @@ static void revertSettings(WMButton * button, InspectorPanel * panel) wWindowSetupInitialAttributes(wwin, &level, &workspace); - for (i = 0; i < 11; i++) { + for (i = 0; i < (sizeof(panel->attrChk)/sizeof(panel->attrChk[0])); i++) { int flag = 0; switch (i) { @@ -924,7 +924,7 @@ static void revertSettings(WMButton * button, InspectorPanel * panel) } WMSetButtonSelected(panel->attrChk[i], flag); } - for (i = 0; i < 12; i++) { + for (i = 0; i < (sizeof(panel->moreChk)/sizeof(panel->moreChk[0])); i++) { int flag = 0; switch (i) { @@ -970,7 +970,7 @@ static void revertSettings(WMButton * button, InspectorPanel * panel) WMSetButtonSelected(panel->moreChk[i], flag); } if (panel->appFrm && wapp) { - for (i = 0; i < 3; i++) { + for (i = 0; i < (sizeof(panel->appChk)/sizeof(panel->appChk[0])); i++) { int flag = 0; switch (i) { -- 1.7.10
