[PATCH 08/12] wayland-server: Abort if a read from a client gives 0 length
Philip Withnall
philip at tecnocode.co.uk
Fri Feb 15 04:57:05 PST 2013
This happens if the socket has been gracefully closed.
Signed-off-by: Philip Withnall <philip at tecnocode.co.uk>
---
src/wayland-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 614dd2f..8eef048 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -252,7 +252,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
len = 0;
if (mask & WL_EVENT_READABLE) {
len = wl_connection_read(connection);
- if (len < 0 && errno != EAGAIN) {
+ if (len <= 0 && errno != EAGAIN) {
wl_client_destroy(client);
return 1;
}
--
1.7.11.7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130215/a8d3ac48/attachment.pgp>
More information about the wayland-devel
mailing list