diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-09-14 19:33:07 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-09-18 12:16:54 +0200 |
commit | e433d512f4b184d3591bd78be6d74b55a84d5d03 (patch) | |
tree | 79ae1904727dca4c93c53fb22026823723decc82 | |
parent | 787cc3a4e59726e68765dbeb6a3f282c7b00f463 (diff) | |
download | strongswan-e433d512f4b184d3591bd78be6d74b55a84d5d03.tar.bz2 strongswan-e433d512f4b184d3591bd78be6d74b55a84d5d03.tar.xz |
dhcp: Fix warning regarding unaligned pointer value due to packed struct
We don't need to access this as uint32_t so just cast it to a char*.
-rw-r--r-- | src/libcharon/plugins/dhcp/dhcp_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c index 4f4e1ffe0..7541c3b49 100644 --- a/src/libcharon/plugins/dhcp/dhcp_socket.c +++ b/src/libcharon/plugins/dhcp/dhcp_socket.c @@ -438,7 +438,7 @@ METHOD(dhcp_socket_t, release, void, DBG1(DBG_CFG, "sending DHCP RELEASE for %H to %H", release, server); chunk = release->get_address(release); - memcpy(&dhcp.client_address, chunk.ptr, + memcpy((char*)&dhcp.client_address, chunk.ptr, min(chunk.len, sizeof(dhcp.client_address))); option = (dhcp_option_t*)&dhcp.options[optlen]; |