We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 334fa6f commit dbfbb5fCopy full SHA for dbfbb5f
kernel/src/filesystem/vfs/syscall/sys_pread64.rs
@@ -44,7 +44,7 @@ impl Syscall for SysPread64Handle {
44
// 检查offset + len是否溢出
45
46
let end_pos = offset.checked_add(len).ok_or(SystemError::EINVAL)?;
47
- if offset > i64::MAX as usize || end_pos > i64::MAX as usize {
+ if end_pos > i64::MAX as usize {
48
return Err(SystemError::EINVAL);
49
}
50
0 commit comments