[PATCH 00/23] WMaker: fixes for stuff reported by Coverity

2014-05-20 Thread Christophe
From: Christophe CURIS Hello, This serie of patch fixes the code in wmaker that are related to 23 bugs reported by Coverity. It does not fix everything, but I have not yet checked what remains. Christophe. src/appicon.c | 21 ++--- src/balloon.c | 6 ++ src/defau

[PATCH 04/23] WMaker: fix memory leak in the docked apps icon chooser (Coverity #50117.1)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, a string could be left unfreed in the case where the docked application's settings dialog is closed before an icon would be actually chosen from the Icon Chooser Dialog. Signed-off-by: Christophe CURIS --- src/dockedapp.c | 3 ++- 1 file changed,

[PATCH 05/23] WMaker: fix memory leak in the windows icon chooser (Coverity #50117.2)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, a string could be left unfreed in the case where the window's attribute dialog is closed before an icon would be actually chosen from the Icon Chooser Dialog. Signed-off-by: Christophe CURIS --- src/winspector.c | 3 ++- 1 file changed, 2 insertio

[PATCH 06/23] WMaker: fix memory leak in wDockTrackWindowLaunch (Coverity #50120 and #50121)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the function 'ProgGetWMClass' always allocates the strings returned in wm_class and wm_instance, so they always must be freed. Signed-off-by: Christophe CURIS --- src/dock.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s

[PATCH 07/23] WMaker: fix memory leak in the root menu parser (Coverity #50122)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if the word "WITH" was used in the content of the root menu definition then its string would not be freed. Signed-off-by: Christophe CURIS --- src/rootmenu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rootmenu.c b/src/rootmenu.c index

[PATCH 03/23] WMaker: fix memory leak in window inspector (Coverity #50116)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, in this specific case the string previously stored in 'file' was lost when replaced with the string from 'db_icon'. The logic have been simplified to avoid the case. Signed-off-by: Christophe CURIS --- src/winspector.c | 15 +++ 1 file

[PATCH 01/23] WMaker: remove unnecessary check in Balloon show function (Coverity #50065)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there is a check to make sure a pointer is not NULL but it is still dereferenced later in the function. As the code is done so that this pointer cannot be NULL then it is not necessary to check that. Signed-off-by: Christophe CURIS --- src/balloon

[PATCH 13/23] WMaker: fix memory leak in app icon changing (Coverity #50139)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there are some cases where the name of the file returned by wIconChooserDialog could be left unfreed. Signed-off-by: Christophe CURIS --- src/appicon.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/appi

[PATCH 14/23] WMaker: fix memory leak in the crash handling dialog (Coverity #50163)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if the function wShowCrashingDialogPanel is not able to connect to the default screen, then the memory allocated for the panel would be leaked. Signed-off-by: Christophe CURIS --- src/dialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 15/23] WMaker: fix memory leak when respawning after crash (Coverity #50165)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the memory allocated to contain the argument list for spawning ourself was never released. Signed-off-by: Christophe CURIS --- src/monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monitor.c b/src/monitor.c index c023b30..f06ff51

[PATCH 02/23] WMaker: fix memory leak in windows menu (Coverity #50109)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there was a memory leak when updating the shortcuts in the menu for windows which occured when a shortcut was associated with the window and this shortcut did not change. Signed-off-by: Christophe CURIS --- src/winmenu.c | 23 +++--

[PATCH 11/23] WMaker: fix memory leak in screen initialisation (Coverity #50134)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if the function wScreenInit fails to properly attach to the screen then the storage structure and content were not released before returning. Signed-off-by: Christophe CURIS --- src/screen.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 09/23] WMaker: fix memory leak in workspace switching (Coverity #50126)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if there's no window to unmap in a workspace, then the array used to build the list of the windows to be unmapped for workspace change would not be freed. Signed-off-by: Christophe CURIS --- src/workspace.c | 13 +++-- 1 file changed, 7 in

[PATCH 08/23] WMaker: fix memory leak in root menu parser (Coverity #50123 and #50124)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if an invalid OPEN_MENU is used then the memory allocated when parsing the line containing it would be leaked. Signed-off-by: Christophe CURIS --- src/rootmenu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/rootmenu.c b/src/

[PATCH 12/23] WMaker: removed unnecessary case handling in appicon setting

2014-05-20 Thread Christophe
From: Christophe CURIS The function wIconChooserDialog already makes sure that it returns NULL if its result would have been an empty string, so it is not necessary to re-check this in setIconCallback, this leads to more complicated code and can't be optimised by the compiler. Signed-off-by: Chr

[PATCH 10/23] WMaker: fix memory leak in the switchpanel backgroung image (Coverity #50131)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, if the target width or height for the center ended being <= 0 then the image created to contain the generated assemblage would be leaked. Signed-off-by: Christophe CURIS --- src/switchpanel.c | 21 +++-- 1 file changed, 11 insertio

[PATCH 16/23] WMaker: fix memory leak in windows saved state handling (Coverity #50171)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the caller of the function 'getSavedState' assumes that if the function returns 0 then the wstate is not initialised. This was not actually true, so this patch changes 'getSavedState' to behave as expected. Signed-off-by: Christophe CURIS --- src/

[PATCH 19/23] WMaker: fix memory leak in the window inspector when saving settings (Coverity #50174)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there is one case where the application dictionary which is created temporarily (when saving the changes in the Window Inspector) could be left allocated. It is now freed in the common path to avoid problems. Signed-off-by: Christophe CURIS --- sr

[PATCH 21/23] WMaker: removed check that is always true in wDefaultsInitDomain (Coverity #50243)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the function 'wdefaultspathfordomain' cannot return a NULL path, so it is not necessary to check for it. (in the present case, it led Coverity to think it was possible to have the structure 'stbuf' uninitialised) Signed-off-by: Christophe CURIS --

[PATCH 17/23] WMaker: fix dangerous code in file scanning for wAdvancedInputDialog (Coverity #50172)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointer by Coverity, the function wstrappend may move the string in memory (because that's what realloc does if it can't expand the allocated buffer in-place), so it is important to use the returned address and not assume the old pointer is still valid. Signed-off-by: C

[PATCH 18/23] WMaker: fix possible memory leak in the icon chooser dialog (Coverity #50173)

2014-05-20 Thread Christophe
From: Christophe CURIS As reported by Coverity, it was possible to return early from the function 'listCallback' without de-allocating a temporary string. The string is now requested after this early return. Signed-off-by: Christophe CURIS --- src/dialog.c | 2 +- 1 file changed, 1 insertion(+

[PATCH 22/23] WMaker: change conceptually imperfect code in drawerDestroy (Coverity #50265)

2014-05-20 Thread Christophe
From: Christophe CURIS Factually, the program works because the function 'drawerRemoveFromChain' uses only the address of the drawer and not the content of the structure, but conceptually this address point to a storage space that has been de-allocated, so that's calling for trouble for future co

[PATCH 20/23] WMaker: fix memory leak in the window inspector when saving settings (Coverity #50175)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, there is one case where the string returned by WMGetTextFieldText could be left allocated. Signed-off-by: Christophe CURIS --- src/winspector.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/winspector.c b/src

[PATCH 23/23] WMaker: removed use of dangerous RETRY macro in GetCommandForPid for Linux (Coverity #50267)

2014-05-20 Thread Christophe
From: Christophe CURIS As pointed by Coverity, the function GetCommandForPid did use a macro 'RETRY' for the 'close' of file descriptor, which is not correct because on success the function 'close' does not reset errno, and in case of failure the file descriptor is not more valid anyway. Signed-

[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.5-417-g1265873f

2014-05-20 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 1265873fa310aa42d42fdfad1483c5f66d304825 (commit) via 1a64ca8275974592c

[PATCH] wrlib: RRotateImage function not fully implemented

2014-05-20 Thread David Maciejak
when the rotation angle value passed to RRotateImage is a modulo of 90, the function is working well but in other cases the rotateImage() function is called. That last function is half implemented but the half already implemented part is also segfaulting (use the testrot.c to replay the crash). So

[PATCH] wrlib: add image flip functions

2014-05-20 Thread David Maciejak
This patch adds RVerticalFlipImage and RHorizontalFlipImage functions. 0001-wrlib-add-image-flip-functions.patch Description: Binary data