libxtrans: Changes to 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 30 23:15:49 UTC 2024
Xtrans.c | 37 +++++++++++++++++++------------------
Xtranslcl.c | 10 ++++------
Xtranssock.c | 31 ++++++++++++++++++++++---------
Xtransutil.c | 23 ++++++++++++++---------
4 files changed, 59 insertions(+), 42 deletions(-)
New commits:
commit 0f153064bfa4bb69e86f3f2383f2f421f2360319
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 18:19:45 2024 -0700
is_numeric: Add TRANS_SERVER to required ifdefs
Avoids -Wunused-function warnings when only building for TRANS_CLIENT
code, such as libFS.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 957adac35fb77d5a72f676d697f32ce94ab7392f
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 18:12:16 2024 -0700
SocketOpen: avoid leak of out-of-range fd
Clears gcc 14.1 warning:
/usr/include/X11/Xtrans/Xtranssock.c: In function ‘_FSTransSocketOpen’:
/usr/include/X11/Xtrans/Xtranssock.c:425:9: warning: leak of file descriptor
[CWE-775] [-Wanalyzer-fd-leak]
425 | free (ciptr);
| ^~~~~~~~~~~~
[...]
| 415 | || ciptr->fd >= sysconf(_SC_OPEN_MAX)
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (62) ...to here
| | (63) following ‘true’ branch...
[...]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit bea5a32105aebdc99f84f9ee4b70de7a116eb1d7
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:49:58 2024 -0700
GetPeerNetworkId: avoid calling strlen() on a NULL pointer
Various failure states may leave addr set to NULL instead of a string.
Clears warnings from gcc 14.1:
/usr/include/X11/Xtrans/Xtransutil.c: In function ‘_IceTransGetPeerNetworkId’:
/usr/include/X11/Xtrans/Xtransutil.c:402:62: warning: use of NULL ‘addr’
where non-null expected [CWE-476] [-Wanalyzer-null-argument]
402 | hostname = malloc (strlen (ciptr->transptr->TransName) + strlen (addr) + 2);
| ^~~~~~~~~~~~
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit e5390ab716fb470ac4b5fd7a4133eabbfaac994e
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:44:41 2024 -0700
GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails
Clears gcc 14.1 warning:
/usr/include/X11/Xtrans/Xtransutil.c:403:5: warning: use of possibly-NULL
‘hostname’ where non-null expected [CWE-690]
[-Wanalyzer-possible-null-argument]
403 | strcpy (hostname, ciptr->transptr->TransName);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 215e8db07d05d425714b05b8a439c73735f9d04f
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:40:10 2024 -0700
GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails
Clears warnings from gcc 14.1:
In file included from /usr/include/X11/Xtrans/transport.c:70:
/usr/include/X11/Xtrans/Xtransutil.c: In function ‘_IceTransGetMyNetworkId’:
/usr/include/X11/Xtrans/Xtransutil.c:253:9: warning: use of possibly-NULL
‘networkId’ where non-null expected [CWE-690]
[-Wanalyzer-possible-null-argument]
253 | sprintf (networkId, "%s/%s:%s", transName,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254 | hostnamebuf, saddr->sun_path);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null
/usr/include/X11/Xtrans/Xtransutil.c:283:9: warning: use of possibly-NULL
‘networkId’ where non-null expected [CWE-690]
[-Wanalyzer-possible-null-argument]
283 | sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 376744aa60ff8df0ddbcf090f0177c15706df71e
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:33:13 2024 -0700
MakeAllCOTSServerListeners: Initialize temp_ciptrs
I don't think this is strictly necessary, but it shouldn't hurt and
makes gcc 14.1 stop warning about:
/usr/include/X11/Xtrans/Xtrans.c: In function
‘_IceTransMakeAllCOTSServerListeners’:
/usr/include/X11/Xtrans/Xtrans.h:108:21: warning: use of uninitialized
value ‘temp_ciptrs[j]’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
108 | #define TRANS(func) _IceTrans##func
/usr/include/X11/Xtrans/Xtrans.c:1203:21: note: in expansion of macro ‘TRANS’
1203 | TRANS(Close) (temp_ciptrs[j]);
| ^~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 742462a572e524ae82a8c18106c03820da322102
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:23:10 2024 -0700
ParseAddress: return failure when strdup() fails
Clears warning from gcc 14.1:
In file included from /usr/include/X11/Xtrans/transport.c:69:
/usr/include/X11/Xtrans/Xtrans.c: In function ‘_IceTransParseAddress’:
/usr/include/X11/Xtrans/Xtrans.c:246:19: warning: use of possibly-NULL ‘mybuf’
where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
246 | if ( ((mybuf = strchr (mybuf,'/')) == NULL) &&
| ^~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit e9ead32308c588e5c12dbfb6a6452e0f2c88bafd
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:18:01 2024 -0700
SocketINETConnect: return failure when malloc() fails
Clears warning from gcc 14.1:
In file included from /usr/include/X11/Xtrans/transport.c:67:
/usr/include/X11/Xtrans/Xtranssock.c: In function ‘_IceTransSocketINETConnect’:
/usr/include/X11/Xtrans/Xtranssock.c:1385:33: warning: dereference of
possibly-NULL ‘addrlist’ [CWE-690] [-Wanalyzer-possible-null-dereference]
1385 | addrlist->firstaddr = NULL;
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 4792e9e798de327572aba1575438b6936a55c7ef
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 17:11:28 2024 -0700
Clear numerous -Wsign-compare warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 9ad6c6764f0517f91492c04ae03a59f53229ef69
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 16:52:05 2024 -0700
SocketCreateListener: Fix -Wuseless-cast warning in bind() call
sockname is defined as struct sockaddr * in the arguments to
SocketCreateListener so we don't need to cast to that when calling bind()
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
commit 9ed4f5ec909cf262a2404012768858792f976e36
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 24 16:51:17 2024 -0700
LocalInitTransports: Fix -Wuseless-cast warning for getenv() call
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20>
More information about the xorg-commit
mailing list