libSM: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 30 23:19:12 UTC 2024


 src/sm_client.c  |    2 +-
 src/sm_process.c |   16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f1e6fc8e62a5da42ea713ee970028be3d32fcf85
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon Aug 26 10:10:37 2024 -0700

    IceReadCompleteMessage callers need to check if malloc() failed
    
    The IceReadCompleteMessage() macro may try to malloc() a buffer and
    assign it to the final argument.
    
    Clears up 6 -Wanalyzer-null-dereference warnings from gcc 14.1
    of the form:
    
    sm_process.c: In function ‘extractArray8’:
    SMlibint.h:128:12: warning: dereference of NULL ‘pData’ [CWE-476]
     [-Wanalyzer-null-dereference]
      128 |     _val = *((CARD32 *) _pBuf); \
          |            ^~~~~~~~~~~~~~~~~~~
    sm_process.c:66:5: note: in expansion of macro ‘EXTRACT_CARD32’
       66 |     EXTRACT_CARD32 (*pBuf, swap, n);
          |     ^~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libsm/-/merge_requests/9>

commit bd243359c390b02bdb89e38779917996c6a38476
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon Aug 26 09:36:41 2024 -0700

    SmcOpenConnection: remove cast of return value from getenv()
    
    getenv() is defined as returning char *, so the cast isn't necessary
    if you've included the header with the proper prototype for it.
    
    Clears gcc 14.1 warning:
    
    sm_client.c: In function ‘SmcOpenConnection’:
    sm_client.c:114:20: warning: useless cast to type ‘char *’ [-Wuseless-cast]
      114 |         if ((ids = (char *) getenv ("SESSION_MANAGER")) == NULL)
          |                    ^
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libsm/-/merge_requests/9>



More information about the xorg-commit mailing list