]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: fix bus error on OpenBSD/sparc64 (Thanks tobiasu)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 29 Jun 2013 17:28:13 +0000 (19:28 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 29 Jun 2013 17:28:13 +0000 (19:28 +0200)
fixes #1034

libi3/ipc_recv_message.c

index 8fd438e3455f2bf1456e1f52fdd18d442bd0aefb..8d36700ad40a088fbdf95d2f8631b2ba3d293f59 100644 (file)
@@ -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);