Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: check read_op.read return value in RGWRados::copy_obj_data #18962

Merged
merged 1 commit into from Nov 27, 2017

Conversation

ZVampirEM77
Copy link
Contributor

@ZVampirEM77 ZVampirEM77 commented Nov 16, 2017

The return-value-type of RGWRados::Object::Read::read is int, and
the return value of RGWRados::Object::Read::read is either the
length of object data which has been read if everything is OK,
or the error value which is a negative value if something is wrong.

If a negative error value is assigned to read_len whose value type is
unsigned long long, the read_len will be a very large value,
which will cause an error during RGWPutObjProcessor processing.

Signed-off-by: Enming Zhang enming.zhang@umcloud.com

The return-value-type of RGWRados::Object::Read::read is int, and
the return value of RGWRados::Object::Read::read is either the
length of object data which has been read if everything is OK,
or the error value which is negative value if something is wrong.

If an negative error value is assigned to read_len which is an
unsigned long long type, the read_len will be a very large value,
which will cause an error during RGWPutObjProcessor processing.

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
@ZVampirEM77
Copy link
Contributor Author

Jenkins, retest this please.

@liewegas liewegas added the rgw label Nov 16, 2017
@ZVampirEM77
Copy link
Contributor Author

Jenkins, retest this please.

@ZVampirEM77
Copy link
Contributor Author

@cbodley ping~

@joscollin
Copy link
Member

@cbodley cbodley merged commit 437b8ed into ceph:master Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants