xmodmap: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 17:05:03 UTC 2022


 exec.c   |   27 +++++++++++++++++----------
 handle.c |   35 ++++++++++++++++++++++++++++++-----
 2 files changed, 47 insertions(+), 15 deletions(-)

New commits:
commit 34df50af33d38621ce5d5a5510c7a4e70e1c17c1
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Apr 17 10:34:10 2022 -0700

    PrintModifierMapping: stop leaking the map returned by XGetKeyboardMapping
    
    Resolves issue reported by Oracle Parfait static analyzer:
    
    Error: Memory leak
       Memory leak [memory-leak] (CWE 401):
          Memory leak of pointer pointer allocated with XGetKeyboardMapping(...)
            at line 251 of app/xmodmap/exec.c in function 'PrintModifierMapping'.
              pointer allocated at line 222 with XGetKeyboardMapping(...)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 10eecbe868b5c898ea9cd05d014fbf13c29c3a26
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Apr 17 10:19:58 2022 -0700

    handle.c: avoid leaks when realloc() fails
    
    Resolves issues reported by Oracle Parfait static analyzer:
    
    Error: Memory leak
       Memory leak [memory-leak] (CWE 401):
          Memory leak of pointer kclist allocated with malloc((n * 1))
            at line 698 of app/xmodmap/handle.c in function 'do_remove'.
              kclist allocated at line 662 with malloc((n * 1))
              kclist leaks when num_kcs != 0 at line 676
                  and (j + 1) >= num_kcs at line 687
                  and (nc + num_kcs) > tot at line 691
                  and (num_kcs - 1) < 0 at line 701.
       Memory leak [memory-leak] (CWE 401):
          Memory leak of pointer kclist allocated with malloc((n * 1))
            at line 711 of app/xmodmap/handle.c in function 'do_remove'.
              kclist allocated at line 662 with malloc((n * 1))
              kclist leaks when (i + 1) >= n at line 672.
    Error: Memory leak
       Memory leak [memory-leak] (CWE 401):
          Memory leak of pointer kclist allocated with realloc(kclist, (tot * 1))
            at line 711 of app/xmodmap/handle.c in function 'do_remove'.
              kclist allocated at line 693 with realloc(kclist, (tot * 1))
              kclist leaks when (num_kcs - 1) < 0 at line 701
                  and (i + 1) >= n at line 672.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list