diff options
Diffstat (limited to 'src/rgw/rgw_op.cc')
-rw-r--r-- | src/rgw/rgw_op.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 9111c5f2998..0b1f7f6b502 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1313,7 +1313,7 @@ void RGWPostObj::execute() unsigned char m[CEPH_CRYPTO_MD5_DIGESTSIZE]; MD5 hash; bufferlist bl, aclbl; - int len; + int len = 0; ret = verify_params(); if (ret < 0) @@ -1356,8 +1356,14 @@ void RGWPostObj::execute() goto done; ofs += len; + + if (ofs > max_allowable_content_length) + goto done; } + if (len < min_allowable_content_length) + goto done; + s->obj_size = ofs; hash.Final(m); |