Merge pull request #3553 from ceph/wip-10701

rgw: use strict_strtoll() for content length

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
Gregory Farnum 2015-01-30 11:37:42 -08:00
commit d3f1d6ea69

View File

@ -1240,7 +1240,7 @@ int RGWREST::preprocess(struct req_state *s, RGWClientIO *cio)
s->content_length = 0;
} else {
string err;
s->content_length = strict_strtol(s->length, 10, &err);
s->content_length = strict_strtoll(s->length, 10, &err);
if (!err.empty()) {
ldout(s->cct, 10) << "bad content length, aborting" << dendl;
return -EINVAL;