Files
xserver/os
Enrico Weigelt, metux IT consult 4ae70b0a09 os: Xtranssock: fix warning on strncpy() call
> ../os/Xtranssock.c:494:5: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
>  494 |     strncpy(addr->sa_data, port, portlen);
>      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../os/Xtranssock.c:446:15: note: length computed here
>  446 |     portlen = strlen(port) + 1; // include space for trailing null
>      |               ^~~~~~~~~~~~

Since we already know the string length, we can just use memcpy()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 16:40:43 +02:00
..
2025-09-22 12:00:14 +02:00
2025-07-18 22:24:55 +02:00
2025-09-22 12:00:14 +02:00
2025-09-22 12:00:14 +02:00
2025-09-22 12:00:14 +02:00
2025-07-31 17:01:10 +02:00