diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-11-11 23:18:01 +0100 |
---|---|---|
committer | Mark Kettenis <kettenis@openbsd.org> | 2013-11-21 11:35:07 +0100 |
commit | 8b2c8aabe27bcaa4de6432b53c4a1296010ea823 (patch) | |
tree | 626309e9ad944add252ded40bb9ff6e74d93d33c /README | |
parent | 81662d2018a35a161a5e9707563ee7f503f8d3e0 (diff) |
Fix alignment issues in FD passing code
A char array on the stack is not guaranteed to have more than byte
alignment. This means that casting it to a 'struct cmsghdr' and
accessing its members may result in unaligned access. This will
generate SIGBUS on strict alignment architectures like OpenBSD/sparc64.
The solution is to use a union to force proper alignment.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions