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

fix: [disk-encrypt] unencrypt part error #148

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

itsXuSt
Copy link
Contributor

@itsXuSt itsXuSt commented Sep 24, 2024

The seek pos is greater than part size.
add limit for this.

Change-Id: I07839506f171858152ce2865f812714769023d9e

The seek pos is greater than part size.
add limit for this.

Change-Id: I07839506f171858152ce2865f812714769023d9e
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在修改后的代码中,当partSize % kStepSize == 0时,mvCount的值会减1,这可能是一个逻辑错误,因为原代码中当partSize % kStepSize不为0时才需要增加1。
  • 新增的if (currMovedIndex * kStepSize >= partSize)条件判断中,如果currMovedIndex * kStepSize大于或等于partSize,则会打印警告信息并调用clearMem()函数。这个逻辑可能不正确,因为clearMem()函数没有被在提交中定义或引入。
  • blockFile.seek(currMovedIndex * kStepSize)语句中,如果seek pos failed!的信息被打印,但没有相应的错误处理或恢复机制,可能会导致程序异常终止。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: itsXuSt, Johnson-zs

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@itsXuSt
Copy link
Contributor Author

itsXuSt commented Sep 24, 2024

/merge

@deepin-bot deepin-bot bot merged commit adcab84 into linuxdeepin:master Sep 24, 2024
6 checks passed
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.

4 participants