summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index a25e9fe9c..f5d86ed05 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -672,9 +672,9 @@ channel_open(
{
char *p;
- /* When using host->h_addr directly ubsan warns for it to not be
- * aligned. First copy the pointer to aviod that. */
- memcpy(&p, &host->h_addr, sizeof(p));
+ /* When using host->h_addr_list[0] directly ubsan warns for it to not
+ * be aligned. First copy the pointer to avoid that. */
+ memcpy(&p, &host->h_addr_list[0], sizeof(p));
memcpy((char *)&server.sin_addr, p, host->h_length);
}