mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-05 11:12:42 +00:00
The size of `int` is machine specific and may be 64 bits wide, which could overflow the calloc'able size. Practically cannot happen here, since the ListenTransCount can't go above MAX_CONNECTIONS, but compiler can't know that and so spitting out a warning. Using uint32_t really is sufficient here. > ../os/connection.c: In function ‘CreateWellKnownSockets’: > ../os/connection.c:274:22: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] > 274 | ListenTransFds = calloc(ListenTransCount, sizeof(int)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
31 KiB
31 KiB