Skip to content

rafs: fix a underflow bug in rafs v6 implementation #1017

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

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

jiangliu
Copy link
Collaborator

Fix a underflow bug in find_target_block() of RAFS v6. last is usize instead of isize so it may underflow.

Signed-off-by: Jiang Liu [email protected]

Fix a underflow bug in find_target_block() of RAFS v6. `last` is usize
instead of isize so it may underflow.

Signed-off-by: Jiang Liu <[email protected]>
@anolis-bot
Copy link
Collaborator

@jiangliu , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/44589

let inode = self.disk_inode();
if inode.size() == 0 {
return Err(enoent!());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so when we get Err()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several map_err()? in the function body.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the caller get_child_by_name() while return enoent() if find_target_block() returns Ok(None).

@anolis-bot
Copy link
Collaborator

@jiangliu , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@jiangliu jiangliu merged commit 24c3bb9 into dragonflyoss:stable/v2.1 Jan 18, 2023
@jiangliu jiangliu deleted the v6-underflow-2.1 branch March 28, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants