libX11: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 4 23:43:24 UTC 2024


 modules/im/ximcp/imCallbk.c |    6 ++++--
 modules/im/ximcp/imDefIm.c  |    2 +-
 src/xlibi18n/lcWrap.c       |    6 +++---
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit f2ebbce6d0978d2d84f840196b03ee35a3ca1736
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Sep 29 10:24:23 2024 -0700

    _XimStrConversionCallback: use size_t to calculate size to malloc
    
    Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
    
    imCallbk.c:346:9: error: ‘memcpy’ offset 10 is out of the bounds [0, 1]
     [-Werror=array-bounds=]
      346 |         memcpy(&buf[p],&cbrec.text->string.mbs,length_in_bytes);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>

commit 75c5bdee81b3a1147c2f123db7a052a4a79fbea4
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Sep 29 10:04:40 2024 -0700

    _XimEncodingNegotiation: swap order of arguments to calloc
    
    Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
    
    imDefIm.c: In function ‘_XimEncodingNegotiation’:
    imDefIm.c:1739:15: error: ‘memcpy’ offset 8 is out of the bounds [0, 1]
     [-Werror=array-bounds=]
     1739 |         (void)memcpy((char *)&buf_s[2], name_ptr, name_len);
          |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>

commit 1f01aafa6d9100c5d4a48636b188334cdb223bd5
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun Sep 29 09:06:32 2024 -0700

    _XlcDefaultMapModifiers: remove conversions between size_t & int
    
    Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined:
    
    lcWrap.c: In function ‘_XlcDefaultMapModifiers’:
    lcWrap.c:149:9: warning: ‘strcpy’ writing between 4294967296 and
     9223372036854775806 bytes into a region of size 1 [-Wstringop-overflow=]
      149 |         strcpy(mods, prog_mods);
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    ../../include/X11/Xlibint.h:457:24: note: destination object of size 1
     allocated by ‘malloc’
      457 | # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size)))
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    lcWrap.c:147:12: note: in expansion of macro ‘Xmalloc’
      147 |     mods = Xmalloc(i);
          |            ^~~~~~~
    lcWrap.c:149:9: error: ‘__builtin_memcpy’ forming offset [1, 4294967295]
     is out of the bounds [0, 1] [-Werror=array-bounds=]
      149 |         strcpy(mods, prog_mods);
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267>



More information about the xorg-commit mailing list