libxkbfile: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 20 16:08:31 UTC 2024


 src/xkmout.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit bf985c68acb1244f51ec91414532a2347fbc1c4c
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Jul 13 15:09:58 2024 -0700

    WriteXKMIndicators: dereference pointer after checking for NULL, not before
    
    Found by gcc 14.1:
    xkmout.c: In function ‘WriteXKMIndicators’:
    xkmout.c:728:8: warning: check of ‘**result.xkb.indicators’ for NULL after
     already dereferencing it [-Wanalyzer-deref-before-check]
      728 |     if (xkb->indicators != NULL) {
          |        ^
    [...]
    ‘WriteXKMIndicators’: events 22-23
      |
      |  727 |     size += xkmPutCARD32(file, xkb->indicators->phys_indicators);
      |      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |      |             |
      |      |             (22) pointer ‘**result.xkb.indicators’ is dereferenced here
      |  728 |     if (xkb->indicators != NULL) {
      |      |        ~
      |      |        |
      |      |        (23) pointer ‘**result.xkb.indicators’ is checked for NULL
                           here but it was already dereferenced at (22)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/merge_requests/19>



More information about the xorg-commit mailing list