]> git.eshelyaron.com Git - emacs.git/commit
Avoid undefined behavior in struct sockaddr
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 May 2017 20:35:52 +0000 (13:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 May 2017 20:36:56 +0000 (13:36 -0700)
commite54a3b4fde0c3de7964a2e604c7381101e5d9951
treed663011b3e5c07c978078a4879f77907d1db3262
parent184d74ce002ecb7399cb2b47fc671bfb2feb9855
Avoid undefined behavior in struct sockaddr

Problem noted by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00391.html
* src/conf_post.h (ATTRIBUTE_MAY_ALIAS, DECLARE_POINTER_ALIAS):
New macros.
* src/process.c (conv_sockaddr_to_lisp, conv_lisp_to_sockaddr)
(connect_network_socket, network_interface_info)
(server_accept_connection): Use it when aliasing non-char objects.
src/conf_post.h
src/process.c