From 4b9b692bb7a8571bf49b409d3505bab1f5cf0635 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 14 Sep 2011 04:29:01 +0200 Subject: [PATCH] unix: fix off-by-one error in comparison Only 3 of the 4 buffer list entries were being used. --- src/unix/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index d9b8b49f..a5d860d0 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -685,7 +685,7 @@ int uv_write(uv_write_t* req, uv_stream_t* stream, uv_buf_t bufs[], int bufcnt, req->type = UV_WRITE; ngx_queue_init(&req->queue); - if (bufcnt < UV_REQ_BUFSML_SIZE) { + if (bufcnt <= UV_REQ_BUFSML_SIZE) { req->bufs = req->bufsml; } else {