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: download object might fail for local invariable uninitialized #20612

Merged
merged 1 commit into from Feb 27, 2018

Conversation

Projects
None yet
4 participants
@fangyuxiangGL
Copy link
Contributor

fangyuxiangGL commented Feb 27, 2018

@cbodley @aclamk sorry, there was an omission in #20226 , codes may reach return r; with r uninitialized

@fangyuxiangGL fangyuxiangGL force-pushed the fangyuxiangGL:com branch from 4f14d57 to b96ba67 Feb 27, 2018

@@ -79,7 +79,6 @@ int RGWGetObj_Decompress::handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len
bufferlist out_bl, in_bl, temp_in_bl;
bl.copy(bl_ofs, bl_len, temp_in_bl);
bl_ofs = 0;
int r;

This comment has been minimized.

Copy link
@aclamk

aclamk Feb 27, 2018

Contributor

I think that simple initialization "int r = 0; " would be better.
It will set value that is to be returned, if no actions with next->handle_data are executed.
Otherwise, we just pass value.

This comment has been minimized.

Copy link
@fangyuxiangGL

fangyuxiangGL Feb 27, 2018

Author Contributor

ok!

@cbodley cbodley added the bug fix label Feb 27, 2018

rgw: download object might fail for local invariable uninitialized
This is an omission in #20226

Fixes: http://tracker.ceph.com/issues/23146

Signed-off-by: fang yuxiang <fang.yuxiang@eisoo.com>

@fangyuxiangGL fangyuxiangGL force-pushed the fangyuxiangGL:com branch from b96ba67 to f5d2a66 Feb 27, 2018

@cbodley cbodley removed the needs-review label Feb 27, 2018

@cbodley cbodley merged commit 375cba1 into ceph:master Feb 27, 2018

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.