Use memcpy to avoid unaligned access 90/250790/3
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 4 Jan 2021 13:56:28 +0000 (14:56 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 4 Jan 2021 19:34:47 +0000 (20:34 +0100)
commitf8f77aa1a76f0c308ece4a88da6af7125508f466
tree7f3b547e44a1b2887aa489e511f330ca157c71ac
parentdf6fadcf5aee54dca55cb170b02cc6874b955675
Use memcpy to avoid unaligned access

Casting unsigned char* to signalfd_siginfo* may cause an unaligned
access (see -Wcast-align). Use memcpy to avoid it.

Verify by sending SIGTERM to key-manager, observing the logs and
systemctl status. The service should stop without errors.

systemctl start central-key-manager
kill -SIGTERM `pidof key-manager`
systemctl status central-key-manager

Change-Id: I061cc2f488cba9252ed65b0d8ca22840f725a433
src/manager/main/socket-manager.cpp