Re: [PATCH 0/2] A few fixes on previous patchs

2014-11-29 Thread Carlos R. Mafra
On Sat, 29 Nov 2014 at 21:19:07 +0100, Christophe wrote: > From: Christophe CURIS > > Because sometime CLang can be a pain, and sometime it helps... > > Proposing to merge them to the patchs because there's no added value in > the changes themselves (although I'm open if Carlos thinks opposite).

[PATCH 1/2] merge with 00f3ab0eaa754db65bd85c8a7183b1877442e4d0

2014-11-29 Thread Christophe
From: Christophe CURIS CLang does not support nested function declaration, so we have to fall back to using a macro, with all the drawbacks it has. A new version, because in my anger against CLang I missed undefining the macro at the end, something automatic when using a nested function... ---

[PATCH 2/2] merge with c0d4c16336b98d9baf0d89aaa42d3e4520b73cae

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Clang, the declaration of array was using the GNU old syntax, not the standard C. --- WPrefs.app/Appearance.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index 9e0e8a6..c8c

[PATCH 1/2] merge with 00f3ab0eaa754db65bd85c8a7183b1877442e4d0

2014-11-29 Thread Christophe
From: Christophe CURIS CLang does not support nested function declaration, so we have to fall back to using a macro, with all the drawbacks it has. --- src/misc.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/misc.c b/src/misc.c index 51eb

[PATCH 0/2] A few fixes on previous patchs

2014-11-29 Thread Christophe
From: Christophe CURIS Because sometime CLang can be a pain, and sometime it helps... Proposing to merge them to the patchs because there's no added value in the changes themselves (although I'm open if Carlos thinks opposite). Regards, Christophe. WPrefs.app/Appearance.c | 12 ++--

Re: QT applications behaving wron on multiscreen setups

2014-11-29 Thread Christophe
- Moritz wrote : > [...] > As it worked before (was using WM 0.95.4 until today) I'm pretty sure these > changes cause QT to misbehave. Hi, There is a possibility that this may have been already solved in the dev branch, there have been a patch recently that reverted some stuff causing a

[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.6-120-ga24efec6

2014-11-29 Thread crmafra
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project wmaker-crm.git. The branch, next has been updated via a24efec61f020b7a693f14d45d09fa331aee62e7 (commit) via 6397f3403a7451168

[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.6-104-g4f050eba

2014-11-29 Thread crmafra
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project wmaker-crm.git. The branch, next has been updated via 4f050ebab997782461d7c6b65dea7b535916329f (commit) from 88352b72743a99712

[PATCH 16/16] util: use wfree instead of free for consistency

2014-11-29 Thread Christophe
From: Christophe CURIS The memory was allocated with wmalloc, so for consistency it should be freed using wfree. This could be a problem if the user compiled with support for Boehm GC, or if we later decide to add support for other malloc libraries. Signed-off-by: Christophe CURIS --- util/get

[PATCH 15/16] util: return from 'findCopyFile' if the source file could not be found (Coverity #50075)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the function handles the case where the file to be copied is not found by properly warning the user and the deleting the currently built theme directory, but then it continued executing the file copy that would crash on the null pointer. This patch

[PATCH 08/16] wmaker: remove intermediate strcpy in updateWorkspaceMenu (Coverity #50213)

2014-11-29 Thread Christophe
From: Christophe CURIS Coverity warned because the 2 strcpy may overflow the target buffer (the code relies on a constant for the max allowed workspace name length). As in both cases the temporary copy is not useful because the temp copy will be strdup'd just after, this patch removes the tempor

[PATCH 11/16] wmaker: removed variable 'done' to prepare return status in 'wNETWMProcessClientMessage'

2014-11-29 Thread Christophe
From: Christophe CURIS Using a variable to store the return value that will be used later is not a good idea, because it forces to track everywhere in the function when needing to work on the function. This patch removes the variables and places explicit return if each case, so on first look it

[PATCH 05/16] wmaker: change strcpy to the version with size check (Coverity #50217)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there were a number of copies done into fixed-size buffer, it's safer to use the function that sets a limit on the size to avoid a crash. Signed-off-by: Christophe CURIS --- src/appmenu.c | 15 +++ 1 file changed, 7 insertions(+), 8 de

[PATCH 14/16] WPrefs: fix memory leaks on temporary colours to draw icon's title in Appearence preview (Coverity #72808, #72810)

2014-11-29 Thread Christophe
From: Christophe CURIS Two WMColor were created to draw the background for the title on icons for iconified windows, in the Appearance panel. As pointed by Coverity, these colors were not released after use, which this patch fixes. Signed-off-by: Christophe CURIS --- WPrefs.app/Appearance.c |

[PATCH 07/16] wmaker: replaced temporary allocation by local storage for error message

2014-11-29 Thread Christophe
From: Christophe CURIS In case of problem with a directory when building the list of files for the Icon Chooser dialog, an error message was generated using a temporary allocated buffer. This is not really good for memory fragmentation, so this patch re-uses the local buffer which will be enough

[PATCH 06/16] wmaker: fix possible buffer overrun with filename for Icon Chooser (Coverity #50218)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there is a possible (yet improbable) buffer overrun when building the list of files to be used in the Icon Chooser dialog. Better safe than sorry, let's use the safer function to build the complete name, and add a little message to the user in case

[PATCH 09/16] wmaker: do not store return value that we don't use (Coverity #50252)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, we store a value into the variable 'entry' but we never use it later, although we re-use the variable. For the maintainability of the code, it is not really good as it could mislead into thinking the value could be used, so this patch removes the as

[PATCH 13/16] WPrefs: fix memory leak when storing the list of colors in Appearence panel

2014-11-29 Thread Christophe
From: Christophe CURIS The name of the color is stored in a newly created PLString which leaks. This is due to the fact that they are created with a refCount of 1, then the PLArray in which they are placed increments that count, so at list destruction the count would return to 1 instead of 0, mea

[PATCH 12/16] wmaker: remove unnecessary check in acceptXDND (Coverity #72817)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if dock is still null at this point then the function will return via the previous check, because it is not possible to have icon_pos >= 0 if dock is null. This patch removes the check because it complicate the code which is not recommended for main

[PATCH 04/16] wmaker: add check for null pointer in wAppIconCreateForDock (Coverity #50053)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there is in the same procedure a check for null pointer before use, and later a direct use without check. In most case, the pointer is not null, but it one case it is hard to be sure that the pointer cannot be null, so it's safer to just add a check

[PATCH 10/16] wmaker: fix signedness of variable (Coverity #50082, #50222)

2014-11-29 Thread Christophe
From: Christophe CURIS Coverity complain that there can be security issues because the variable 'i' is being modified using untrusted data (coming from a file). This is probably pessimistic, because in the present case we're talking with the kernel. Using the correct signedness for the variable

[PATCH 01/16] WINGs: fix WMPathForResourceOfType to check for all the paths it claims to check

2014-11-29 Thread Christophe
From: Christophe CURIS The "documentation" of the function claims to check for the resource in a number of path, but factually if the application did provide its argument list when creating the WINGs App structure (which is likely) then the search would stop before checking all paths. The code n

[PATCH 02/16] WINGs: to not allocate memory for a short lived array (Coverity #50136)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the array created to temporary store the list of Atoms used in the function 'requestHandler' was leaked. Because this array is very short lived, there is no need to allocate memory for this, it just participates in memory fragmentation. Instead, we

[PATCH 03/16] WINGs: fix possible problems due to sign extension when setting Icon (Coverity #50202)

2014-11-29 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there might be some problems due to sign extension when performing the shifts and ors operations when converting the RImage to the format expected for the WM_ICON property. This patch try to improve things by using as much as possible unsigned types

[PATCH 00/16] Fixes for stuff pointed by Coverity

2014-11-29 Thread Christophe
From: Christophe CURIS Hello, This serie of patch fixes the code that are related to 13 bugs reported by Coverity, plus a few similar things not found by Coverity but seen while investigating bugs. #50053: Dereference after null check (wmaker) #50075: Dereference after null check (util) #500

[PATCH 1/1] WINGs: fix infinite loop when using Pango on string that have to be split

2014-11-29 Thread Christophe
From: Christophe CURIS As reported by Charles Philip Chan, WPrefs would get into infinite loop when the support for Pango is enabled. The problem is due to long strings that are broken into multiple lines by WINGs. This is done in an iterative process in the internal function 'fitText'. In orde

[PATCH 0/1] Bug squashing

2014-11-29 Thread Christophe
From: Christophe CURIS ...because their place is not in WindowMaker's code. Thanks to Charles Philip Chan for taking the time to test, and even to provide a stack trace! WINGs/wfont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.1 -- To unsubscribe, send mail to wmaker-