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

Projects
None yet
5 participants
@ZVampirEM77
Copy link
Contributor

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

rgw: check read_op.read return value in RGWRados::copy_obj_data
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

This comment has been minimized.

Copy link
Contributor Author

commented Nov 16, 2017

Jenkins, retest this please.

@liewegas liewegas added the rgw label Nov 16, 2017

@ZVampirEM77

This comment has been minimized.

Copy link
Contributor Author

commented Nov 17, 2017

Jenkins, retest this please.

@ZVampirEM77

This comment has been minimized.

Copy link
Contributor Author

commented Nov 20, 2017

@cbodley ping~

@joscollin

This comment has been minimized.

Copy link
Member

commented Nov 24, 2017

@cbodley cbodley merged commit 437b8ed into ceph:master Nov 27, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.