twm: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Oct 6 18:51:39 UTC 2018


 src/util.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 777236e942ae85bcacfdc2e086944a42cfed5b45
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Sep 30 14:35:15 2018 -0700

    If we can't find a colormap to replace, insert new one instead of leaking it
    
    Found by Oracle's Parfait 2.2 static analyzer:
    
    Error: Memory leak
       Memory leak [memory-leak] (CWE 401):
          Memory leak of pointer sc allocated with malloc(32)
            at line 421 of src/util.c in function 'InsertRGBColormap'.
              sc allocated at line 397 with malloc(32)
              sc leaks when replace != 0 at line 405.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 4512f268c689db62b46c88e813935c66eda14742
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Sep 30 14:28:35 2018 -0700

    When replacing a colormap, free old map, not new one
    
    Found by Oracle's Parfait 2.2 static analyzer:
    
    Error: Use after free
       Use after free [use-after-free] (CWE 416):
          Use after free of pointer Scr
            at line 421 of src/util.c in function 'InsertRGBColormap'.
            Invalid pointer accessible via global Scr at line 105 of src/twm.c
              maps escapes to sc->maps at line 419 of src/util.c in function 'InsertRGBColormap'
              maps freed with XFree at line 406
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list