소스 검색

limit vfs_read buffer size when doing system calls

greatbridf 2 년 전
부모
커밋
576ca427b0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/kernel/syscall.cpp

+ 1 - 1
src/kernel/syscall.cpp

@@ -104,7 +104,7 @@ void _syscall_read(interrupt_stack* data)
     }
 
     // TODO: copy to user function !IMPORTANT
-    int n_wrote = fs::vfs_read(file->impl.ind, buf, 0U - 1, file->cursor, n);
+    int n_wrote = fs::vfs_read(file->impl.ind, buf, n, file->cursor, n);
     file->cursor += n_wrote;
     SYSCALL_SET_RETURN_VAL(n_wrote, 0);
 }