From: Michael Stapelberg Date: Sat, 29 Jun 2013 17:28:13 +0000 (+0200) Subject: Bugfix: fix bus error on OpenBSD/sparc64 (Thanks tobiasu) X-Git-Tag: 4.6~13^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cecadbfdfe01b770e8a7832e94e0ca58073a03f9;p=i3%2Fi3 Bugfix: fix bus error on OpenBSD/sparc64 (Thanks tobiasu) fixes #1034 --- diff --git a/libi3/ipc_recv_message.c b/libi3/ipc_recv_message.c index 8fd438e3..8d36700a 100644 --- a/libi3/ipc_recv_message.c +++ b/libi3/ipc_recv_message.c @@ -54,10 +54,10 @@ int ipc_recv_message(int sockfd, uint32_t *message_type, } walk += strlen(I3_IPC_MAGIC); - *reply_length = *((uint32_t*)walk); + memcpy(reply_length, walk, sizeof(uint32_t)); walk += sizeof(uint32_t); if (message_type != NULL) - *message_type = *((uint32_t*)walk); + memcpy(message_type, walk, sizeof(uint32_t)); *reply = smalloc(*reply_length);