Skip to content

Commit dbfbb5f

Browse files
Update kernel/src/filesystem/vfs/syscall/sys_pread64.rs
Co-authored-by: Copilot <[email protected]>
1 parent 334fa6f commit dbfbb5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/src/filesystem/vfs/syscall/sys_pread64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl Syscall for SysPread64Handle {
4444
// 检查offset + len是否溢出
4545

4646
let end_pos = offset.checked_add(len).ok_or(SystemError::EINVAL)?;
47-
if offset > i64::MAX as usize || end_pos > i64::MAX as usize {
47+
if end_pos > i64::MAX as usize {
4848
return Err(SystemError::EINVAL);
4949
}
5050

0 commit comments

Comments
 (0)