From 4f736752bbdf3bbf1a6325af7ad470198aa5a82a Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 20 Mar 2010 15:17:43 +0000 Subject: libxcb git update --- libxcb/src/xcb_conn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libxcb/src/xcb_conn.c') diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index 251d62e01..ed2153d27 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -211,8 +211,10 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info) xcb_connection_t* c; c = calloc(1, sizeof(xcb_connection_t)); - if(!c) + if(!c) { + close(fd); return (xcb_connection_t *) &error_connection; + } c->fd = fd; -- cgit v1.2.3 From 6412df1b3df28c6213b43821c4a98cc3857d9a3f Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 15 Apr 2010 07:50:39 +0000 Subject: Git update 15/4/2010 --- libxcb/src/xcb_conn.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libxcb/src/xcb_conn.c') diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index ed2153d27..1d3761452 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -210,6 +210,14 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info) { xcb_connection_t* c; +#ifndef USE_POLL + if(fd >= FD_SETSIZE) /* would overflow in FD_SET */ + { + close(fd); + return (xcb_connection_t *) &error_connection; + } +#endif + c = calloc(1, sizeof(xcb_connection_t)); if(!c) { close(fd); -- cgit v1.2.3 From a46e26df6103fb0e6e00d8d11d58c3f7a358208c Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 19 Apr 2010 12:25:24 +0000 Subject: libxcb update 19/4/2010 --- libxcb/src/xcb_conn.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libxcb/src/xcb_conn.c') diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index 1d3761452..50a662bb2 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -102,10 +102,7 @@ static int write_setup(xcb_connection_t *c, xcb_auth_info_t *auth_info) assert(count <= (int) (sizeof(parts) / sizeof(*parts))); pthread_mutex_lock(&c->iolock); - { - struct iovec *parts_ptr = parts; - ret = _xcb_out_send(c, &parts_ptr, &count); - } + ret = _xcb_out_send(c, parts, count); pthread_mutex_unlock(&c->iolock); return ret; } -- cgit v1.2.3