]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGWCivetWeb::read_data: fix arguments to mg_read() call 21382/head
authorNathan Cutler <ncutler@suse.com>
Sun, 8 Apr 2018 19:59:04 +0000 (21:59 +0200)
committerNathan Cutler <ncutler@suse.com>
Thu, 12 Apr 2018 16:01:42 +0000 (18:01 +0200)
Fixes: http://tracker.ceph.com/issues/23596
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit d595125c20991cd4ab70a87c267e945d132ff1c2)

src/rgw/rgw_civetweb.cc

index fd99584aafc7cbb4faad4edcfdaac262b966b39b..c3f585cfc21863624d3212eace00d358980578aa 100644 (file)
@@ -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());
     }