net: sockets: Specify alignment for sockaddr* structs
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.
The issue was reported by UBSAN:
utils.c:802:8: runtime error: member access within misaligned
address 0xf4aff186 for type 'struct sockaddr_in6', which requires
4 byte alignment
Signed-off-by:
Robert Lubos <robert.lubos@nordicsemi.no>
Loading
Please sign in to comment