]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: in S3 PUT, don't crash on Content-Length == 0
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 12 May 2011 00:27:10 +0000 (17:27 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 12 May 2011 00:27:10 +0000 (17:27 -0700)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/rgw/rgw_rest.cc

index d8131e5bd4a54497eb1203bcd5c77b85f8710d94..833d6b9674a9f1c7d9cb3dad68c02575607d89c4 100644 (file)
@@ -257,7 +257,9 @@ int RGWCopyObj_REST::get_params()
 
 int RGWPutACLs_REST::get_params()
 {
-  size_t cl = atoll(s->length);
+  size_t cl = 0;
+  if (s->length)
+    cl = atoll(s->length);
   if (cl) {
     data = (char *)malloc(cl + 1);
     if (!data) {