From c491eeb9a9f670f7d4869d7dae7a5adce4565998 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Tue, 7 Mar 2006 21:19:58 -0800 Subject: [PATCH] Fix off-by-one error that kept the last byte(s) of the output queue from being used. --- src/xcb_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xcb_out.c b/src/xcb_out.c index 2494ef3..1faf2a5 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -237,7 +237,7 @@ int _xcb_out_write(XCBConnection *c) int _xcb_out_write_block(XCBConnection *c, struct iovec *vector, size_t count) { assert(!c->out.vec && !c->out.vec_len); - while(count && c->out.queue_len + vector[0].iov_len < sizeof(c->out.queue)) + while(count && c->out.queue_len + vector[0].iov_len <= sizeof(c->out.queue)) { memcpy(c->out.queue + c->out.queue_len, vector[0].iov_base, vector[0].iov_len); c->out.queue_len += vector[0].iov_len;