diff --git a/x11/i3/Makefile b/x11/i3/Makefile index b4ce2a609f8..039bcbe8678 100644 --- a/x11/i3/Makefile +++ b/x11/i3/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.13 2011/04/07 08:58:10 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.14 2011/04/29 09:18:53 dcoppa Exp $ COMMENT = improved dynamic tiling window manager DISTNAME = i3-3.e-bf2 PKGNAME = i3-3.5.2 -REVISION = 0 +REVISION = 1 CATEGORIES = x11 diff --git a/x11/i3/patches/patch-src_ipc_c b/x11/i3/patches/patch-src_ipc_c index daaf0fa45b7..4a45d4e6697 100644 --- a/x11/i3/patches/patch-src_ipc_c +++ b/x11/i3/patches/patch-src_ipc_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-src_ipc_c,v 1.1 2010/09/14 08:54:18 dcoppa Exp $ ---- src/ipc.c.orig Wed Jun 9 09:58:15 2010 -+++ src/ipc.c Thu Jul 15 14:43:03 2010 +$OpenBSD: patch-src_ipc_c,v 1.2 2011/04/29 09:18:53 dcoppa Exp $ +--- src/ipc.c.orig Wed Jan 19 21:26:37 2011 ++++ src/ipc.c Wed Apr 27 16:56:21 2011 @@ -91,7 +91,7 @@ static void ipc_send_message(int fd, const unsigned ch char msg[buffer_size]; char *walk = msg; @@ -10,7 +10,27 @@ $OpenBSD: patch-src_ipc_c,v 1.1 2010/09/14 08:54:18 dcoppa Exp $ walk += strlen("i3-ipc"); memcpy(walk, &message_size, sizeof(uint32_t)); walk += sizeof(uint32_t); -@@ -502,20 +502,20 @@ void ipc_new_client(EV_P_ struct ev_io *w, int revents +@@ -437,7 +437,8 @@ static void ipc_receive_message(EV_P_ struct ev_io *w, + n -= strlen(I3_IPC_MAGIC); + + /* The next 32 bit after the magic are the message size */ +- uint32_t message_size = *((uint32_t*)message); ++ uint32_t message_size; ++ memcpy(&message_size, (uint32_t*)message, sizeof(uint32_t)); + message += sizeof(uint32_t); + n -= sizeof(uint32_t); + +@@ -447,7 +448,8 @@ static void ipc_receive_message(EV_P_ struct ev_io *w, + } + + /* The last 32 bits of the header are the message type */ +- uint32_t message_type = *((uint32_t*)message); ++ uint32_t message_type; ++ memcpy(&message_type, (uint32_t*)message, sizeof(uint32_t)); + message += sizeof(uint32_t); + n -= sizeof(uint32_t); + +@@ -502,20 +504,20 @@ void ipc_new_client(EV_P_ struct ev_io *w, int revents int ipc_create_socket(const char *filename) { int sockfd; @@ -36,7 +56,7 @@ $OpenBSD: patch-src_ipc_c,v 1.1 2010/09/14 08:54:18 dcoppa Exp $ return -1; } -@@ -524,14 +524,14 @@ int ipc_create_socket(const char *filename) { +@@ -524,14 +526,14 @@ int ipc_create_socket(const char *filename) { struct sockaddr_un addr; memset(&addr, 0, sizeof(struct sockaddr_un)); addr.sun_family = AF_LOCAL; diff --git a/x11/i3bar/Makefile b/x11/i3bar/Makefile index 6043a464cbe..84bb0f3e6fb 100644 --- a/x11/i3bar/Makefile +++ b/x11/i3bar/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2011/04/20 08:57:54 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.2 2011/04/29 09:18:53 dcoppa Exp $ COMMENT = status and workspace bar for i3 DISTNAME = i3bar-0.6.21 +REVISION = 0 CATEGORIES = x11 MAINTAINER = David Coppa diff --git a/x11/i3bar/patches/patch-src_ipc_c b/x11/i3bar/patches/patch-src_ipc_c index a82863f17ef..af21cf7bdbe 100644 --- a/x11/i3bar/patches/patch-src_ipc_c +++ b/x11/i3bar/patches/patch-src_ipc_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-src_ipc_c,v 1.1.1.1 2011/04/20 08:57:54 dcoppa Exp $ +$OpenBSD: patch-src_ipc_c,v 1.2 2011/04/29 09:18:53 dcoppa Exp $ --- src/ipc.c.orig Mon Apr 11 16:26:03 2011 -+++ src/ipc.c Tue Apr 12 10:53:45 2011 ++++ src/ipc.c Fri Apr 29 10:58:38 2011 @@ -12,6 +12,7 @@ #include #include @@ -9,3 +9,17 @@ $OpenBSD: patch-src_ipc_c,v 1.1.1.1 2011/04/20 08:57:54 dcoppa Exp $ #include #include #include +@@ -160,9 +161,11 @@ void got_data(struct ev_loop *loop, ev_io *watcher, in + } + + char *walk = header + strlen(I3_IPC_MAGIC); +- uint32_t size = *((uint32_t*) walk); ++ uint32_t size; ++ memcpy(&size, (uint32_t*)walk, sizeof(uint32_t)); + walk += sizeof(uint32_t); +- uint32_t type = *((uint32_t*) walk); ++ uint32_t type; ++ memcpy(&type, (uint32_t*)walk, sizeof(uint32_t)); + + /* Now that we know, what to expect, we can start read()ing the rest + * of the message */