From d595125c20991cd4ab70a87c267e945d132ff1c2 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Sun, 8 Apr 2018 21:59:04 +0200 Subject: [PATCH] RGWCivetWeb::read_data: fix arguments to mg_read() call Fixes: http://tracker.ceph.com/issues/23596 Signed-off-by: Nathan Cutler --- src/rgw/rgw_civetweb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc index c28fac47652..41bc61a684f 100644 --- a/src/rgw/rgw_civetweb.cc +++ b/src/rgw/rgw_civetweb.cc @@ -57,7 +57,7 @@ size_t RGWCivetWeb::read_data(char *buf, size_t len) return 0; } for (c = 0; c < len; c += ret) { - ret = mg_read(conn, buf, len); + ret = mg_read(conn, buf+c, len-c); if (ret < 0) { throw rgw::io::Exception(EIO, std::system_category()); } -- 2.39.5