From: Nathan Cutler Date: Sun, 8 Apr 2018 19:59:04 +0000 (+0200) Subject: RGWCivetWeb::read_data: fix arguments to mg_read() call X-Git-Tag: v12.2.6~120^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c014faa2136748701c866e4dace2541da828cc1a;p=ceph.git RGWCivetWeb::read_data: fix arguments to mg_read() call Fixes: http://tracker.ceph.com/issues/23596 Signed-off-by: Nathan Cutler (cherry picked from commit d595125c20991cd4ab70a87c267e945d132ff1c2) --- diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc index fd99584aafc7..c3f585cfc218 100644 --- a/src/rgw/rgw_civetweb.cc +++ b/src/rgw/rgw_civetweb.cc @@ -56,7 +56,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()); }