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
  discards  76725a019de07e59b31fe680c4e86fcb49172246 (commit)
  discards  f34f64ca89220f894048f1df228fe7e6905f03c5 (commit)
  discards  a2402b6f14774ccebf6ea78732d08771d2946943 (commit)
  discards  e7e99c5d9a92d24d89e4b2a9bfaae222ed42c092 (commit)
  discards  f174e9ca105025174a1870cf8333cee139fa8e84 (commit)
  discards  955b5c2bc338d95fe103acc167ba92ba58f310d9 (commit)
  discards  0896ae055c092dd13eb2668ff98221350a0fbddd (commit)
  discards  46e45554ff4806e60f4291ce88ef77420373a388 (commit)
  discards  4b721d04c74876bce93e22650bbe085c2f703758 (commit)
  discards  8c3fe490b25be322c5af5fd1035043e20a8d83fc (commit)
       via  9b65f55f536ccdac87c8cff40e14b74796da4ed1 (commit)
       via  266d9a2945c11aa6c79d558a0b05898a325c8568 (commit)
       via  8eb6c82231373c5c507019210bb43a30544e9854 (commit)
       via  f4f96a8fb7d1e43605fc74ba9eac35213e457abf (commit)
       via  894d1c80a36a7c5f9fb396f5afb35f0414c9b8ef (commit)
       via  27a2259934aabb98b90adc633ab8366205284a5e (commit)
       via  c54bb11ee9caeffe716b3f7d240f76afe991e965 (commit)
       via  a9e2923f67a3256c5085c1d532a63b5e7f6da277 (commit)
       via  dc2a991e219fa5c06a1294cac256fa44e7c9206a (commit)
       via  4b7bb5bc5c141e395551f6538a782c12ae3b6dac (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (76725a019de07e59b31fe680c4e86fcb49172246)
                         N -- N -- N (9b65f55f536ccdac87c8cff40e14b74796da4ed1)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/9b65f55f536ccdac87c8cff40e14b74796da4ed1

commit 9b65f55f536ccdac87c8cff40e14b74796da4ed1
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:49 2014 +0200

    WPrefs: add warning when renderTexture encounters some unknow settings
    
    Having the warning displayed will help devs to understand what is going
    on and where to look at for a fix.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 05354952..2d5acbe6 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -567,6 +567,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -592,6 +593,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -625,6 +627,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        style = RHorizontalGradient;
                        break;
                default:
+                       wwarning("unknow direction in '%s', falling back to 
diagonal", type);
                case 'D':
                        style = RDiagonalGradient;
                        break;
@@ -669,6 +672,11 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                        image = RScaleImage(timage, width, height);
                        RReleaseImage(timage);
                        break;
+
+               default:
+                       wwarning("type '%s' in not a supported type for a 
texture", type);
+                       RReleaseImage(timage);
+                       return None;
                }
        }
 

http://repo.or.cz/w/wmaker-crm.git/commit/266d9a2945c11aa6c79d558a0b05898a325c8568

commit 266d9a2945c11aa6c79d558a0b05898a325c8568
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:48 2014 +0200

    WPrefs: fix NULL pointer handling when getting the Modifiers (Coverity 
#50200)
    
    As pointed by Coverity, the allocated value returned by XGetModifierMapping
    is assumed to be non-NULL everywhere except when releasing it.
    Removed this last check (useless) and added a little check at the beginning
    to avoid an (improbable) crash.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c
index 226652e5..1845ada4 100644
--- a/WPrefs.app/xmodifier.c
+++ b/WPrefs.app/xmodifier.c
@@ -119,7 +119,7 @@ static void x_reset_modifier_mapping(Display * display)
        int super_bit = 0;
        int alt_bit = 0;
        int mode_bit = 0;
-       XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
+       XModifierKeymap *x_modifier_keymap;
 
 #define modwarn(name,old,other)                                                
             wwarning ("%s (0x%x) generates %s, which is generated by %s.",     
        @@ -155,6 +155,12 @@ static void x_reset_modifier_mapping(Display * 
display)
     else                                                                       
     old = modifier_index;
 
+       x_modifier_keymap = XGetModifierMapping(display);
+       if (x_modifier_keymap == NULL) {
+               wwarning("XGetModifierMapping returned NULL, there is no 
modifiers or no memory.n");
+               return;
+       }
+
        mkpm = x_modifier_keymap->max_keypermod;
        for (modifier_index = 0; modifier_index < 8; modifier_index++)
                for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
@@ -270,8 +276,7 @@ static void x_reset_modifier_mapping(Display * display)
        AltIndex = alt_bit;
        ModeIndex = mode_bit;
 
-       if (x_modifier_keymap != NULL)
-               XFreeModifiermap(x_modifier_keymap);
+       XFreeModifiermap(x_modifier_keymap);
 }
 
 int ModifierFromKey(Display * dpy, const char *key)

http://repo.or.cz/w/wmaker-crm.git/commit/8eb6c82231373c5c507019210bb43a30544e9854

commit 8eb6c82231373c5c507019210bb43a30544e9854
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:47 2014 +0200

    WPrefs: fix memory leak when saving window handling settings (Coverity 
#50158)
    
    As pointed by Coverity, the functions WMCreatePLString return a newly
    allocated WMPropList, which must be released when not needed anymore.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c
index 9d7ab54d..0976b17d 100644
--- a/WPrefs.app/WindowHandling.c
+++ b/WPrefs.app/WindowHandling.c
@@ -222,7 +222,8 @@ static void showData(_Panel * panel)
 static void storeData(_Panel * panel)
 {
        WMPropList *arr;
-       char x[16], y[16];
+       WMPropList *x, *y;
+       char buf[16];
 
        SetBoolForKey(WMGetButtonSelected(panel->miconB), "NoWindowOverIcons");
        SetBoolForKey(WMGetButtonSelected(panel->mdockB), "NoWindowOverDock");
@@ -234,9 +235,13 @@ static void storeData(_Panel * panel)
        SetBoolForKey(WMGetButtonSelected(panel->tranB), 
"OpenTransientOnOwnerWorkspace");
 
        SetStringForKey(placements[WMGetPopUpButtonSelectedItem(panel->placP)], 
"WindowPlacement");
-       sprintf(x, "%i", WMGetSliderValue(panel->hsli));
-       sprintf(y, "%i", WMGetSliderValue(panel->vsli));
-       arr = WMCreatePLArray(WMCreatePLString(x), WMCreatePLString(y), NULL);
+       sprintf(buf, "%i", WMGetSliderValue(panel->hsli));
+       x = WMCreatePLString(buf);
+       sprintf(buf, "%i", WMGetSliderValue(panel->vsli));
+       y = WMCreatePLString(buf);
+       arr = WMCreatePLArray(x, y, NULL);
+       WMReleasePropList(x);
+       WMReleasePropList(y);
        SetObjectForKey(arr, "WindowPlaceOrigin");
 
        SetIntegerForKey(WMGetSliderValue(panel->resS), "EdgeResistance");

http://repo.or.cz/w/wmaker-crm.git/commit/f4f96a8fb7d1e43605fc74ba9eac35213e457abf

commit f4f96a8fb7d1e43605fc74ba9eac35213e457abf
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:46 2014 +0200

    WPrefs: fix memory leak when editing a delay for the dock (Coverity #50156)
    
    As reported by Coverity, the return string of WMGetTextFieldText is
    malloced so it needs to be freed.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Docks.c b/WPrefs.app/Docks.c
index 2a5265aa..84049419 100644
--- a/WPrefs.app/Docks.c
+++ b/WPrefs.app/Docks.c
@@ -120,6 +120,7 @@ static void autoDelayChanged(void *observerData, 
WMNotification *notification)
                }
                char *value = WMGetTextFieldText(anAutoDelayT);
                adjustButtonSelectionBasedOnValue(panel, row, value);
+               free(value);
                return;
        }
 }

http://repo.or.cz/w/wmaker-crm.git/commit/894d1c80a36a7c5f9fb396f5afb35f0414c9b8ef

commit 894d1c80a36a7c5f9fb396f5afb35f0414c9b8ef
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:45 2014 +0200

    WPrefs: fix memory leak when saving settings (Coverity #50140 + #50157 + 
#50159)
    
    As pointed by Coverity, the string returned by 'WMGetTextFieldText' is
    allocated dynamically, so it must be freed when not needed anymore.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Docks.c b/WPrefs.app/Docks.c
index 7d54f30c..2a5265aa 100644
--- a/WPrefs.app/Docks.c
+++ b/WPrefs.app/Docks.c
@@ -292,7 +292,11 @@ static void storeData(_Panel *panel)
        int i;
        for (i = 0; i < 4; i++)
        {
-               SetStringForKey(WMGetTextFieldText(panel->autoDelayT[i]), 
auto_delay[i].key);
+               char *str;
+
+               str = WMGetTextFieldText(panel->autoDelayT[i]);
+               SetStringForKey(str, auto_delay[i].key);
+               wfree(str);
        }
        for (i = 0; i < 3; i++)
        {
diff --git a/WPrefs.app/Focus.c b/WPrefs.app/Focus.c
index 3ee8ec94..ea4b20f2 100644
--- a/WPrefs.app/Focus.c
+++ b/WPrefs.app/Focus.c
@@ -138,6 +138,7 @@ static void storeData(_Panel * panel)
        if (sscanf(str, "%i", &i) != 1)
                i = 0;
        SetIntegerForKey(i, "RaiseDelay");
+       free(str);
 
        SetBoolForKey(WMGetButtonSelected(panel->ignB), "IgnoreFocusClick");
        SetBoolForKey(WMGetButtonSelected(panel->newB), "AutoFocus");
diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index cb767e6c..741bf97b 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -750,6 +750,7 @@ static void storeData(_Panel * panel)
        tmp = WMGetTextFieldText(panel->ddelaT);
        if (sscanf(tmp, "%i", &i) == 1 && i > 0)
                SetIntegerForKey(i, "DoubleClickTime");
+       wfree(tmp);
 
        SetBoolForKey(WMGetButtonSelected(panel->disaB), 
"DisableWSMouseActions");
 

http://repo.or.cz/w/wmaker-crm.git/commit/27a2259934aabb98b90adc633ab8366205284a5e

commit 27a2259934aabb98b90adc633ab8366205284a5e
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:44 2014 +0200

    WPrefs: fix memory leak when editing the label of a menu (Coverity #50130)
    
    As pointed by Coverity, the function 'WMGetTextFieldText' already allocates
    memory for its return string, so it is not necessary to wstrdup it.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/editmenu.c b/WPrefs.app/editmenu.c
index c3cf296a..7a9b29b9 100644
--- a/WPrefs.app/editmenu.c
+++ b/WPrefs.app/editmenu.c
@@ -809,13 +809,9 @@ static void handleEvents(XEvent * event, void *data)
 
 static void stopEditItem(WEditMenu * menu, Bool apply)
 {
-       char *text;
-
        if (apply) {
-               text = WMGetTextFieldText(menu->tfield);
-
                wfree(menu->selectedItem->label);
-               menu->selectedItem->label = wstrdup(text);
+               menu->selectedItem->label = WMGetTextFieldText(menu->tfield);
 
                updateMenuContents(menu);
 

http://repo.or.cz/w/wmaker-crm.git/commit/c54bb11ee9caeffe716b3f7d240f76afe991e965

commit c54bb11ee9caeffe716b3f7d240f76afe991e965
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:43 2014 +0200

    WPrefs: fix memory leak in loadRImage (Coverity #50107)
    
    As pointed by Coverity, if there is a problem when reading the binary data
    of an RImage from a file, the area allocated to store it would not be
    freed.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index f67975d9..05354952 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -1276,13 +1276,13 @@ static Pixmap loadRImage(WMScreen * scr, const char 
*path)
        }
        image = RCreateImage(w, h, d == 4);
        read_size = w * h * d;
-       if (fread(image->data, 1, read_size, f) != read_size) {
-               fclose(f);
-               return None;
-       }
+       if (fread(image->data, 1, read_size, f) == read_size)
+               RConvertImage(WMScreenRContext(scr), image, &pixmap);
+       else
+               pixmap = None;
+
        fclose(f);
 
-       RConvertImage(WMScreenRContext(scr), image, &pixmap);
        RReleaseImage(image);
 
        return pixmap;

http://repo.or.cz/w/wmaker-crm.git/commit/a9e2923f67a3256c5085c1d532a63b5e7f6da277

commit a9e2923f67a3256c5085c1d532a63b5e7f6da277
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:42 2014 +0200

    WPrefs: fix memory leak in buildPLFromMenu (Coverity #50105)
    
    As pointed by Coverity, the PLArray that is created to store the return
    value of the function 'processData' can be left allocated if some case
    handling decide to return NULL instead.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 59d407e3..afe8700d 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1557,7 +1557,7 @@ static WMPropList *processData(const char *title, 
ItemData * data)
        switch (data->type) {
        case ExecInfo:
                if (data->param.exec.command == NULL)
-                       return NULL;
+                       goto return_null;
 #if 1
                if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
                        s1 = "SHEXEC";
@@ -1607,7 +1607,7 @@ static WMPropList *processData(const char *title, 
ItemData * data)
        case PipeInfo:
        case PLPipeInfo:
                if (!data->param.pipe.command)
-                       return NULL;
+                       goto return_null;
                if (data->type == PLPipeInfo)
                        WMAddToPLArray(item, poplmenu);
                else
@@ -1623,18 +1623,19 @@ static WMPropList *processData(const char *title, 
ItemData * data)
 
        case ExternalInfo:
                if (!data->param.external.path)
-                       return NULL;
+                       goto return_null;
                WMAddToPLArray(item, pomenu);
                WMAddToPLArray(item, 
WMCreatePLString(data->param.external.path));
                break;
 
        case DirectoryInfo:
-               if (!data->param.directory.directory || 
!data->param.directory.command)
-                       return NULL;
                {
                        int l;
                        char *tmp;
 
+                       if (!data->param.directory.directory || 
!data->param.directory.command)
+                               goto return_null;
+
                        l = strlen(data->param.directory.directory);
                        l += strlen(data->param.directory.command);
                        l += 32;
@@ -1665,6 +1666,10 @@ static WMPropList *processData(const char *title, 
ItemData * data)
        }
 
        return item;
+
+ return_null:
+       WMReleasePropList(item);
+       return NULL;
 }
 
 static WMPropList *processSubmenu(WEditMenu * menu)

http://repo.or.cz/w/wmaker-crm.git/commit/dc2a991e219fa5c06a1294cac256fa44e7c9206a

commit dc2a991e219fa5c06a1294cac256fa44e7c9206a
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:41 2014 +0200

    WPrefs: fix possible crash when saving mouse modifier (Coverity #50098)
    
    As pointed by Coverity, there is a possible NULL pointer dereference in the
    code that extracts the selected modifier (from a popup button list).
    
    The code assumes that there is always a space between the core name of the
    modifier (which is used for saving) and the more user friendly name. This
    is true if the list could be successfully generated in fillModifierPopUp,
    but it may not be the case if that function has to fall-back to the
    default list (XGetModifierMaping failure).
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index 31d467de..cb767e6c 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -768,7 +768,8 @@ static void storeData(_Panel * panel)
        tmp = WMGetPopUpButtonItem(panel->grabP, 
WMGetPopUpButtonSelectedItem(panel->grabP));
        tmp = wstrdup(tmp);
        p = strchr(tmp, ' ');
-       *p = 0;
+       if (p != NULL)
+               *p = '0';
 
        SetStringForKey(tmp, "ModifierKey");
 

http://repo.or.cz/w/wmaker-crm.git/commit/4b7bb5bc5c141e395551f6538a782c12ae3b6dac

commit 4b7bb5bc5c141e395551f6538a782c12ae3b6dac
Author: Christophe CURIS <[email protected]>
Date:   Sat May 31 19:58:40 2014 +0200

    WPrefs: fix NULL pointer dereference in the Pixmap/Icon path panel 
(Coverity #50073 + #50150)
    
    As pointed by Coverity, it is possible to dereference the NULL pointer in
    the function 'browseForFile'.
    This should have been reported by the compiler ("possible use of
    uninitialised variable") but the assignation of a default value to the
    variable 'lPtr' hides this, but as the default value is not a good one then
    the code could crash.
    This patch removes the default value, so we may have some info from the
    compiler and handles the case smoothly.
    
    It also fixes a potential memory leak pointed also by Coverity in the
    case where the string returned by WMGetFilePanelFileName would be a 0
    length non-null string.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/WPrefs.app/Paths.c b/WPrefs.app/Paths.c
index 86f27a40..6aa7ef57 100644
--- a/WPrefs.app/Paths.c
+++ b/WPrefs.app/Paths.c
@@ -149,22 +149,24 @@ static void browseForFile(WMWidget * w, void *data)
                                len--;
                        }
                        if (len > 0) {
-                               WMList *lPtr = NULL;
+                               WMList *lPtr;
                                int i;
 
                                if (w == panel->icoaB)
                                        lPtr = panel->icoL;
                                else if (w == panel->pixaB)
                                        lPtr = panel->pixL;
+                               else
+                                       goto error_unknown_widget;
 
                                i = WMGetListSelectedItemRow(lPtr);
                                if (i >= 0)
                                        i++;
                                addPathToList(lPtr, i, str);
                                WMSetListBottomPosition(lPtr, 
WMGetListNumberOfRows(lPtr));
-
-                               wfree(str);
                        }
+               error_unknown_widget:
+                       wfree(str);
                }
        }
 }

-----------------------------------------------------------------------

Summary of changes:
 WPrefs.app/Paths.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to