Files
xserver/os
Adam Jackson 652913cd94 os: Fix a type error in the IPv6 XDMCP code
Building with strict-aliasing rightly chirps here:

../os/xdmcp.c: In function ‘XdmcpRegisterConnection’:
../os/xdmcp.c:489:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     &((struct sockaddr_in6 *) &address)->sin6_addr.s6_addr[12];
                               ^~~~~~~~~~~~

We have "const char *address", so &address here is a char ** (i.e., it
points to the slot on the stack containing the pointer to the character
array passed in as an argument). Casting that to a struct sockaddr_in6 *
is wrong, because it means that area of the stack will be reinterpreted
as a struct sockaddr_in6.

Instead, cast address, not &address.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-08 16:19:42 -05:00
..
2017-10-30 13:45:20 -04:00
2015-11-30 11:51:22 -05:00
2017-02-23 09:20:48 +10:00
2017-10-30 13:45:20 -04:00
2017-11-06 17:22:46 -05:00
2016-07-21 15:04:47 -04:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2017-08-30 15:53:04 -04:00
2017-11-06 17:22:46 -05:00
2013-10-31 16:58:12 -07:00