commit adf389fc19aedbf1be077b05365d164cd6f463d8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Dec 13 13:31:30 2024 -0800

    libICE 1.1.2
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 6cea89b54964e756bc3fdebf3da42db2711785c7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Nov 16 16:40:31 2024 -0800

    ProcessAuthReply: Handle -Wconditional-uninitialized warning
    
    Clears warning from clang 13:
    
    process.c:1612:21: warning: variable 'authDataLen' may be uninitialized
     when used here [-Wconditional-uninitialized]
        if (authData && authDataLen > 0)
                        ^~~~~~~~~~~
    process.c:1344:22: note: initialize the variable 'authDataLen' to
     silence this warning
        int                 authDataLen;
                                       ^
                                        = 0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/23>

commit 4f7f5b10fa5e328a6bfa83a0411cb6b8bf44b49d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Nov 16 16:17:12 2024 -0800

    ICElibint.h: add do ... while (0) around macro definitions
    
    Clears 71 warnings from clang 13 of the form:
    
    connect.c:351:39: warning: empty expression statement has no effect;
     remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
            STORE_STRING (pData, IceVendorString);
                                                 ^
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/23>

commit a767164a8e4467a5faa1265536f05a4bea8f8df0
Author: mahendra <mahendra.n@samsung.com>
Date:   Tue Nov 10 14:01:39 2015 +0530

    libICE : Dereferencing a possible NULL pointer in error.c
    
    In function _IceErrorSetupFailed at line no 188, IceAllocScratch is used to
    allocate memory for variable pStart and pBuf.
    
    IceAllocScratch is using malloc for memory allocation, malloc can return
    NULL on failure. So before dereferencing pStart and pBuf, NULL check must
    apply.
    
    v2 (by alanc): correct inverted tests for NULL from original patch
    
    Closes: #5
    Signed-off-by: mahendra <mahendra.n@samsung.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/22>

commit 3ea01ff303843b13ffa18bc8207d4f41631ea66c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Nov 9 08:07:37 2024 -0800

    write_counted_string: avoid undefined behavior in fwrite() call
    
    In C23 and earlier, it is undefined behavior to call fwrite() with a
    NULL pointer, even if the size to copy is zero bytes.
    
    Closes: #11
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/21>

commit cea5bb04617449756994a999ff258884aac802d1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Nov 8 11:52:26 2024 -0800

    AuthRequired: avoid undefined behavior in memcpy() call
    
    In C23 and earlier, it is undefined behavior to call memcpy() with a
    NULL pointer, even if the size to copy is zero bytes.
    
    Closes: #10
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/20>

commit 296eff6b5f9ce0b2147c14ac96fea3bb2de37d70
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 25 10:50:47 2024 -0700

    IceRegisterForProtocolSetup: return failure if malloc() failed
    
    Clears warning from gcc 14.1:
    
    register.c: In function ‘IceRegisterForProtocolSetup’:
    register.c:92:15: warning: dereference of possibly-NULL ‘p’ [CWE-690]
     [-Wanalyzer-possible-null-dereference]
       92 |     p->vendor = strdup(vendor);
          |     ~~~~~~~~~~^~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit fafdde691754159c586d95c87d090afcf306ca4d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 25 10:34:50 2024 -0700

    IceProtocolSetup: return failure if malloc() failed for authIndices
    
    Clears warning from gcc 14.1:
    
    protosetup.c: In function ‘IceProtocolSetup’:
    protosetup.c:178:24: warning: dereference of NULL ‘authIndices’ [CWE-476]
     [-Wanalyzer-null-dereference]
      178 |             authIndices[i]]);
          |             ~~~~~~~~~~~^~~
    ICElibint.h:179:36: note: in definition of macro ‘STORE_STRING’
      179 |     CARD16 _len = (CARD16) strlen (_string); \
          |                                    ^~~~~~~
      ‘IceProtocolSetup’: events 1-8
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit b9c70bd2537bcb591135b8dc79ace7115c608ca7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 25 10:24:21 2024 -0700

    ProcessProtocolSetup: return failure if malloc() failed for ProtocolName
    
    Clears warning from gcc 14.1:
    
    process.c: In function ‘ProcessProtocolSetup’:
    process.c:1956:56: warning: use of NULL ‘protocolName’ where non-null
     expected [CWE-476] [-Wanalyzer-null-argument]
     1956 |             if (iceConn->process_msg_info[i].in_use && strcmp (protocolName,
          |                                                        ^~~~~~~~~~~~~~~~~~~~
     1957 |                 iceConn->process_msg_info[i].protocol->protocol_name) == 0)
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit b25db77dba416c6684b3130f007a13d762033ebd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 25 10:12:47 2024 -0700

    ProcessConnectionSetup: avoid writing to NULL pointer if malloc() failed
    
    Clears warning from gcc 14.1:
    
    process.c: In function ‘ProcessConnectionSetup’:
    ICElibint.h:233:13: warning: dereference of possibly-NULL ‘hisAuthNames’
     [CWE-690] [-Wanalyzer-possible-null-dereference]
      233 |     _string = malloc (_len + 1); \
    ICElibint.h:247:9: note: in expansion of macro ‘EXTRACT_STRING’
      247 |         EXTRACT_STRING (_pBuf, _swap, _strings[_i]); \
          |         ^~~~~~~~~~~~~~
    process.c:947:9: note: in expansion of macro ‘EXTRACT_LISTOF_STRING’
      947 |         EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
          |         ^~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit 8adbc70b77c80b75c9b66dd56852a01f524df37a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 25 09:41:35 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 12 -Wanalyzer-null-dereference warnings from gcc 14.1
    of the form:
    
    process.c: In function ‘ProcessError’:
    ICElibint.h:214:10: warning: dereference of NULL ‘pStart’ [CWE-476]
     [-Wanalyzer-null-dereference]
      214 |     _val = *((CARD16 *) _pBuf); \
          |          ^
    ICElibint.h:232:5: note: in expansion of macro ‘EXTRACT_CARD16’
      232 |     EXTRACT_CARD16 (_pBuf, _swap, _len); \
          |     ^~~~~~~~~~~~~~
    process.c:689:17: note: in expansion of macro ‘EXTRACT_STRING’
      689 |                 EXTRACT_STRING (pData, swap, temp);
          |                 ^~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit ac3458271b0edbce1e9c827a8e9dc83aa938f8a2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 24 16:42:09 2024 -0700

    Clear some -Wuseless-cast warnings from gcc 14.1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit 9d9841da2deca16a5350ee813fd6b9d3dd3b1b02
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 24 16:04:42 2024 -0700

    _IceAddOpcodeMapping: Avoid writing to NULL pointer if malloc fails
    
    Clears warning from gcc 14.1:
    
    misc.c: In function ‘_IceAddOpcodeMapping’:
    misc.c:435:9: warning: use of possibly-NULL ‘*iceConn.process_msg_info’
     where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
      435 |         memcpy (iceConn->process_msg_info, oldVec,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      436 |             oldsize * sizeof (_IceProcessMsgInfo));
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit 4b8b12b432c86601e773dfccf8d17e87bb453f07
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 24 15:34:50 2024 -0700

    EXTRACT_STRING: Avoid writing to NULL pointer if malloc fails
    
    Fixes several warnings from gcc 14.1 of the form:
    
    In file included from error.c:33:
    error.c: In function ‘_IceDefaultErrorHandler’:
    ICElibint.h:234:5: warning: use of possibly-NULL ‘estr’ where non-null
     expected [CWE-690] [-Wanalyzer-possible-null-argument]
      234 |     memcpy (_string, _pBuf, _len); \
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    error.c:515:13: note: in expansion of macro ‘EXTRACT_STRING’
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit 00f59affb7e14fb25b40ba0a009cd8ff5dd3039a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 24 15:21:07 2024 -0700

    ConnectToPeer: return failure if malloc() fails
    
    Fixes warning from gcc 14.1:
    connect.c: In function ‘ConnectToPeer’:
    connect.c:541:9: warning: use of possibly-NULL ‘address’ where non-null
     expected [CWE-690] [-Wanalyzer-possible-null-argument]
      541 |         strncpy (address, ptr, len);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit 4b6f0759a8cbcd5cc1fc0a6ee0359f734194f365
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 24 15:13:26 2024 -0700

    IceOpenConnection: stop processing messages if connection was closed
    
    Fixes warning from gcc 14.1 in cases where the connection was closed
    and iceConn set to NULL on a previous time through the loop.
    
    connect.c: In function ‘IceOpenConnection’:
    connect.c:439:51: warning: dereference of NULL ‘iceConn’ [CWE-476]
     [-Wanalyzer-null-dereference]
      439 |                     iceConn->my_ice_version_index =
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      440 |                         reply.connection_reply.version_index;
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libice/-/merge_requests/19>

commit e8a561b500f7b783d84d81ba158fd28b007745ae
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Oct 13 12:27:49 2023 -0700

    gitlab CI: add xz-utils to container for "make distcheck"
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 246bfdb00c1ec716caf4e91178bda8389d3ecf1d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Oct 13 12:13:34 2023 -0700

    gitlab CI: Update to latest CI templates
    
    Current template fails to rebuild the CI container with the current
    Debian stable release (a new release since the last update)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 1e3fe79e3a5346bc2dbf8108afec1e69a42ff822
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Mar 28 09:50:17 2023 -0700

    Set close-on-exec when opening files
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 5b9d4d27a2b8441e966d701bf337ace848c4e4fd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Mar 4 10:44:45 2023 -0800

    configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
    
    AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
    so it's time to rely on it.
    
    Clears autoconf warnings:
    
    configure.ac:18: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
    configure.ac:18: You should run autoupdate.
    aclocal.m4:3640: AC_PROG_LIBTOOL is expanded from...
    configure.ac:18: the top level
    
    libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
    libtoolize: and rerunning libtoolize and aclocal.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit be1888a46e446dfcaa62ac0a97d96bb77b6816d4
Author: Matt Turner <mattst88@gmail.com>
Date:   Thu Dec 8 10:41:44 2022 -0500

    libICE 1.1.1
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit e176b676cff17948d68299c00dddefe41638c752
Author: Arsen Arsenović <arsen@aarsen.me>
Date:   Sun Dec 4 22:19:20 2022 +0100

    ICEmsg: Fix C++ interoperability error due to static_assert define
    
    Commit 0269c687e954db7aca2a4344e32cb203315a00b6 added a static_assert helper
    that gets defined to blank if left undefined by assert.h.  As this is not a
    macro in other languages that use this header, this can lead to a compile-time
    error.
    
    Bug: https://bugs.gentoo.org/884369

commit 6c057be0f0aef0aeabb9a00e6814548fed0c125a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Dec 3 16:48:25 2022 -0800

    libICE 1.1.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f032db0964e6d73b4f3c3264c1f8fbbb023fdf4c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Nov 23 10:29:44 2022 -0800

    configure: Use AC_SYS_LARGEFILE to enable large file support
    
    The only files libICE operates on are .ICEauthority files, which
    it only uses internally and does not make available to other code,
    so there is no concern about ABI mismatch here.
    
    While .ICEauthority files should never be more than 2gb in size,
    they may be stored on filesystems with large inodes.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit dd207b23f8d8ffe36e6727c813372a7858aafd02
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Nov 10 10:02:24 2022 -0800

    ice.pc.in: "Libs.Private" should be "Libs.private"
    
    Fixes: b9411f7 ("ice.pc.in: add -lbsd flags when required")
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 0515b88aa55e6e55d7ab2808d245fdd64f7863ff
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Oct 27 19:01:46 2022 -0700

    Avoid -Wdeclaration-after-statement warnings from static_assert
    
    Some implementations of static_assert() define a new variable.
    Avoid warnings from those when calling static_assert() from a
    macro that may not be at the top of a new code block.
    
    ../../src/accept.c: In function 'IceAcceptConnection':
    ../../src/accept.c:159:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      159 |     IceGetHeader (iceConn, 0, ICE_ByteOrder,
          |     ^~~~~~~~~~~~
    ../../src/connect.c: In function 'IceOpenConnection':
    ../../src/connect.c:254:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      254 |     IceGetHeader (iceConn, 0, ICE_ByteOrder,
          |     ^~~~~~~~~~~~
    ../../src/connect.c:340:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      340 |     IceGetHeaderExtra (iceConn, 0, ICE_ConnectionSetup,
          |     ^~~~~~~~~~~~~~~~~
    [...etc...]
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 246cbc402aabe5e971c43d1a21b66ab4c602f1cf
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Oct 27 18:42:47 2022 -0700

    Only link with libbsd if needed for arc4random_buf() or getentropy()
    
    Avoid unnecessary library dependency when using a libc with these
    functions included
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 81da58f39d274ab7f822fb22e56b5b2027597a51
Author: Guillem Jover <guillem@hadrons.org>
Date:   Thu Oct 6 00:26:11 2022 +0000

    Switch from libbsd to libbsd-overlay
    
    This is the preferred usage form for libbsd, as it makes the code more
    portable and requires no special includes for libbsd, by transparently
    injects the needed standard headers that would be used on a BSD.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

commit 96c84e563610d5c7846e601605f675f3d3840dd2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 14 16:29:32 2022 -0700

    Handle arrays too large to fit in iceConn buffers
    
    Fixes numerous gcc warnings of the form:
    
    connect.c: In function ‘IceOpenConnection’:
    ICElibint.h:160:25: warning: potential null pointer dereference [-Wnull-dereference]
         *((CARD16 *) _pBuf) = _val; \
                             ^
    ICElibint.h:174:5: note: in expansion of macro ‘STORE_CARD16’
         STORE_CARD16 (_pBuf, _len); \
         ^~~~~~~~~~~~
    connect.c:351:5: note: in expansion of macro ‘STORE_STRING’
         STORE_STRING (pData, IceReleaseString);
         ^~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 0269c687e954db7aca2a4344e32cb203315a00b6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 7 14:22:44 2022 -0700

    ICEmsg.h: Add static asserts that message header length <= ICE_OUTBUFSIZE
    
    A message header length larger than ICE_OUTBUFSIZE will cause
    buffer overflows.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit b399fc2b3c5c2cf5f0d36d98c372f353a8186d15
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 7 13:37:34 2022 -0700

    IceFlush: signal fatal I/O error if bufptr is past end of buffer
    
    It should never happen, but has been possible in the past when
    we didn't handle buffer checks properly - this would help us
    catch it if a similar mistake ever happens again (or the wrong
    memory pointer gets corrupted by something else).
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 918d58772595e7cd9907a7b08874196442fbf599
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 7 13:36:28 2022 -0700

    Refactor Fatal I/O error handling into a common function
    
    Reduce duplicated code in _IceRead() and _IceWrite()
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 6ca1ea376c7c6c9dc719d607b7684d87bcf96712
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Sep 7 11:33:13 2022 -0700

    IceGetHeaderExtra: only include extra space in outbufptr if there's room
    
    If there's not room for it in the buffer, we already set pData to
    NULL, but still set the outbufptr to include the space, which could
    lead to IceFlush() reading past the end of the buffer.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 76fd1cf6534358426cddaed045514d79270275b5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 20 16:54:52 2022 -0700

    Only link to libbsd for arc4random_buf if it is not found in libc
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 0124a9ea65118ae70bcc155e2a9a36a6c4869310
Author: walter harms <wharms@bfs.de>
Date:   Wed Oct 18 18:09:05 2017 +0200

    make sure buffer is zero filled and report if allocation failed
    
    Signed-off-by: Walter Harms <wharms@bfs.de>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 1e7787324a788fe84f7e438f4db9a47c8f6dd952
Author: walter harms <wharms@bfs.de>
Date:   Wed Oct 18 18:03:47 2017 +0200

    add check for malloc
    
    fix a potential null pointer deference error
    
    Signed-off-by: Walter Harms <wharms@bfs.de>

commit 7b439c788b94849d4f07cda77518bec43ebbd9a6
Author: walter harms <wharms@bfs.de>
Date:   Thu Sep 7 18:46:39 2017 +0200

    connect.c: FIX 'iceConn' shadows a previous local, [-Wshadow]
    
    In function 'IceOpenConnection':  gcc give the following warning:
     connect.c:106:11: warning: declaration of 'iceConn' shadows a previous local  [-Wshadow]
    fixed by renaming 2. iceConn to iConn (and all its uses)
    
    Signed-off-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 348b9a46086ad72d6f29f2637036accff6630db4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 15:17:40 2022 -0700

    ProcessAuthReply: rename status variable to avoid shadowing
    
    Fixes gcc complaint:
    
    process.c: In function ‘ProcessAuthReply’:
    process.c:1478:20: warning: declaration of ‘status’ shadows a previous local [-Wshadow]
     1478 |             Status status = 1;
          |                    ^~~~~~
    process.c:1426:25: note: shadowed declaration is here
     1426 |         IcePaAuthStatus status =
          |                         ^~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit d70c666549a9ee17de7349904529cf41bf023926
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 15:04:53 2022 -0700

    ConnectToPeer: be doubly sure that use-after-free doesn't happen
    
    This resolves an issue reported by the Oracle Parfait static analyzer:
    
    Error: Use after free
       Use after free [use-after-free] (CWE 416):
          Use after free of pointer trans_conn
            at line 566 of lib/libICE/src/connect.c in function 'ConnectToPeer'.
              trans_conn previously freed with _IceTransClose at line 532
              trans_conn was allocated at line 525 with _IceTransOpenCOTSClient
    
    even though I believe this is already handled by the
    'if (madeConnection) { ... } else trans_conn = NULL;'
    block, but the analyzer apparently doesn't follow that logic,
    while this simple change makes it obvious.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 8d2cb9e7a897a070b2509f9de60961c9d154ee99
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 14:39:02 2022 -0700

    configure: check for libbsd before libxtrans checks for strlcpy
    
    If we're going to link to libbsd, might as well use it for strlcpy too
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 9a3534b3e0808a5294f85f2402a2b4410a153b76
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 14:27:55 2022 -0700

    gitlab CI: add a basic build test
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 410d2005f5a1f11e8204d9bc3432e0b145ae3161
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 14:08:43 2022 -0700

    Fix spelling/wording issues
    
    Found by using:
        codespell --builtin clear,rare,usage,informal,code,names
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 08df47e4786d112a639915331702b4a27def6a56
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Apr 30 13:58:58 2022 -0700

    Build xz tarballs instead of bzip2
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit b9411f79f59b63d7d363234d795fa5c77cc738c9
Author: David Callu <callu.david@gmail.com>
Date:   Tue Apr 7 10:20:49 2020 +0200

    ice.pc.in: add -lbsd flags when required

commit 8e6a14c63d6b73cde87cb331439f2a4d19cba5b9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 14 10:37:25 2019 -0700

    libICE 1.0.10
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit b6aad584c1dc278364c295165512b5f5b98c173e
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Thu Apr 11 09:05:15 2019 +0200

    cleanup: Separate variable assignment and test
    
    Assigning and testing a value in a single statement hinders code clarity
    and may confuses static code analyzers.
    
    Separate the assignment and the test for clarity.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>

commit 772e5b0fdfc9dbd8bec070bd0c4c7eb5565df2ee
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Apr 10 11:15:11 2019 +0200

    _IceRead: Avoid possible use-after-free
    
    `_IceRead()` gets called from multiple places which do not expect the
    connection to be freed.
    
    Do not free the connection data in `_IceRead()` to avoid potential
    use-after-free issue in the various callers.
    
    The connection data will be freed eventually in `ProcessWantToClose()`,
    so not freeing it in `_IceRead()` should not introduce an memory leak.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>

commit 1493beba2aa03bdadeed8b4fa5d424df6e113071
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Apr 10 11:01:31 2019 +0200

    IceListenForWellKnownConnections: Fix memleak
    
    The function `_IceTransMakeAllCOTSServerListeners` allocates memory for
    `transConns` which is leaked in case of error.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>

commit a67a477eefdc93c32fa82da6ff0b4e69dd4c2ccb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Mar 24 15:29:34 2019 -0700

    IceWritePad: always use zero values for pad bytes
    
    Previously it would just bump the pointer in the buffer leaving
    whatever values were previously there in place.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 2318ace3340009c44e78eab094f159f0e0b4a197
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Mar 24 14:36:10 2019 -0700

    IceOpenConnection: check for malloc failure on connect_to_you too
    
    Fixes: https://gitlab.freedesktop.org/xorg/lib/libice/issues/4
    
    Reported-by: mahendra <mahendra.n@samsung.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit b484311c929a1b64966d89da92fafce7263006e1
Author: Allison Lortie <desrt@desrt.ca>
Date:   Tue Jun 14 16:09:46 2016 -0400

    authutil: support $XDG_RUNTIME_DIR/ICEauthority
    
    If we find that $XDG_RUNTIME_DIR is set (and $ICEAUTHORITY is not), then
    the ICEauthority file is stored in the XDG_RUNTIME_DIR instead of the
    home directory, and without a leading dot.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=49173
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 48ed5e04b5a8ba64dcfeea090cf3a32d3087b749
Author: Allison Lortie <desrt@desrt.ca>
Date:   Tue Jun 14 16:08:21 2016 -0400

    authutil: fix an out-of-bounds access
    
    There is a theoretical edge case where the $HOME environment variable
    could be set to the empty string.  IceAuthFileName() unconditionally
    checks index 1 of this string, which is out of bounds.
    
    Fix that up by rejecting empty strings in the same way as we reject
    NULL.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=49173
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 468b83ec4810b4ea2373182b5801f998f3dcd471
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Mon Jul 30 20:50:58 2018 +0200

    Always terminate strncpy results.
    
    The function strncpy does not guarantee to append a terminating
    NUL character to the destination.
    
    This patch merges libSM's way of handling this issue into libICE.
    
    Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 1cc4ae8648590f04557a20c8d88d39cef7fe8119
Author: walter harms <wharms@bfs.de>
Date:   Thu Sep 7 18:52:13 2017 +0200

    iceauth.c: FIX warning: unused variable 'ret' in 'arc4random_buf'
    
    commit ff5e59f32255913bb1cdf51441b98c9107ae165b left ret outside the #if
    causing a gcc warning:
    
     In function 'arc4random_buf':
     iceauth.c:89:13: warning: unused variable 'ret' [-Wunused-variable]
    
    fixed by moving  #if 1 up
    
    Signed-off-by:  Walter Harms <wharms@bfs.de>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit ccbcae7d3409789bf346ca35963264d064f54cba
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Dec 7 19:29:55 2018 -0800

    Update configure.ac bug URL for gitlab migration
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit e72ca90879db149bbee6232dd78a565e630e917d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Nov 18 21:48:59 2018 -0800

    Update README for gitlab migration
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit dc73ec034c9083b8c7d980e80eb6d4c88bcfaa51
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Nov 10 13:13:45 2018 -0800

    Remove obsolete B16 & B32 tags in struct definitions
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f66955f7250d7c150dfb97862878acc2222781e5
Author: walter harms <wharms@bfs.de>
Date:   Fri Sep 8 20:03:03 2017 +0200

    make IceProtocolShutdown() more readable
    
    I found IceProtocolShutdown() hard to read only to find that was
    it does it aktually very simple. So i rearranged the code to make
    it more readable.
    
    Signed-off-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    [Emil Velikov: whitespace fixes]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

commit 936dcaac07f7db569ed91a34e0a4b5944aac205f
Author: walter harms <wharms@bfs.de>
Date:   Fri Sep 8 19:59:17 2017 +0200

    Drop NULL check prior to free()
    
    free() can handle NULL just fine - remove the check.
    
    Signed-off-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit 43644931cb9cb5cc92391f6f5431535b9b7a3f24
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Fri Jul 7 11:23:48 2017 +0100

    Make sure string is never NULL
    
    `error_message` is passed in to strncpy() without any check, which
    doesn't handle NULL itself, so let's make it a valid empty string in
    cases where it was NULL.
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Acked-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit e8c21056134498c49733f6baf572ffbb051ed886
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Fri Jul 7 11:23:47 2017 +0100

    Make sure error_message is a free-able string
    
    Similar to the previous commit, assigning a static string would crash
    upon freeing.
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Acked-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit 7a7844bf5ade915268fe7f9b292908c6cd75f3ba
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Fri Jul 7 11:23:46 2017 +0100

    Make sure errorStr is a free-able string
    
    If the `errorClass` isn't handled by the switch, `errorStr`'s initial
    value would be a pointer to some static memory with an empty string,
    and freeing it would most likely crash.
    
    Let's set it to NULL instead, as is done in other similar places.
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Acked-by: Walter Harms <wharms@bfs.de>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit 7ef9680caa8c223a09beb637e26fd3471128e6ba
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sun May 8 09:19:36 2016 +0100

    configure.ac: set TRANS_CLIENT/SERVER
    
    Similar to ICE_t just set the define globally and remove the multiple
    definitions throughout the tree
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)

commit ab64a947b5de5b778f31ede9cfce386566023a14
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sun May 8 09:19:35 2016 +0100

    Kill off local ICE_t definitions
    
    Already defined at global scale in configure.ac
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)

commit f4c00d345edf3dad5893b50ff0ae7cd3e0cfd780
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sun May 8 09:19:34 2016 +0100

    Remove unneeded ^L symbols.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)

commit d603d7d7d989c4ff1094810e9fcf2a29bc00bb0c
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sun May 8 09:19:33 2016 +0100

    Kill off Time_t macro
    
    Analogous to previous commit, including the megacommit that removed the
    need for it.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)

commit 82250f26fc76d7b7574cfd472646a98e325d944a
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sun May 8 09:19:32 2016 +0100

    Kill off Strstr macro
    
    Directly use the strstr function as opposed to wrapping it in a macro.
    The latter is no longer needed as of
    
    commit 72e353567f8927996a26e72848d86f692c3f0737
    Author: Kaleb Keithley <kaleb@freedesktop.org>
    Date:   Fri Nov 14 16:48:46 2003 +0000
    
        XFree86 4.3.0.1
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)

commit ff5e59f32255913bb1cdf51441b98c9107ae165b
Author: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Date:   Tue Apr 4 19:12:53 2017 +0200

    Use getentropy() if arc4random_buf() is not available
    
    This allows to fix CVE-2017-2626 on Linux platforms without pulling in
    libbsd.
    The libc getentropy() is available since glibc 2.25 but also on OpenBSD.
    For Linux, we need at least a v3.17 kernel. If the recommended
    arc4random_buf() function is not available, emulate it by first trying
    to use getentropy() on a supported glibc and kernel. If the call fails,
    fall back to the current (partly vulnerable) code.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 1746abbb1ae1c41ba29c14895c5bd3f1334faef5
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Thu Jan 26 13:52:49 2017 +1000

    autogen: add default patch prefix
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>

commit 3aa14db63fefb7634b1bd4370e33ba14c4ea90ae
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon Mar 9 12:00:52 2015 +0000

    autogen.sh: use quoted string variables
    
    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
    fall-outs, when they contain space.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit d41c57eaa0c1474acf0a6fb271f22106e3070016
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 24 10:32:07 2017 +1000

    autogen.sh: use exec instead of waiting for configure to finish
    
    Syncs the invocation of configure with the one from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit ac4bb20e74e064b219de70e9b54516a921fdb7c3
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Tue Nov 22 20:13:29 2016 +0100

    Fix use after free on subsequent calls
    
    The function IceAuthFileName is vulnerable to a use after free. The
    flaw can be triggered by calling the function three times:
    
    - First call succeeds and stores the path in buf, a dynamically
      allocated buffer with size bsize.
    - Second call fails due to out of memory. It frees buf, but keeps
      the old size in bsize.
    - Third call only checks if bsize is large enough. Then it uses
      buf without allocating it again -- the use after free happens.
    
    In order to exploit this, an attacker must change environment variables
    between each call, namely ICEAUTHORITY or HOME. It also takes subsequent
    calls. Due to these limitations, I don't consider this to be of high
    priority.
    
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit b1720edc9b9f3e7a05caa3fcd81761e5818ea255
Author: Remko van der Vossen <bugs@yuugen.jp>
Date:   Sun Jul 19 08:34:11 2015 -0700

    Bug 90616 - libICE build fails on array bounds check
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90616
    
    Recent versions of gcc have array bounds checking turned on by default,
    this leads to build failures of libICE. As the _IceVersionCount variable
    in ICElibint.h is not declared const the compiler cannot assume that the
    nested for loop in ProcessConnectionSetup stays within bounds.
    
    The simple fix is of course to change the declarations of _IceVersionCount,
[--snip--]
