diff options
Diffstat (limited to 'kern/syscall_misc.c')
| -rw-r--r-- | kern/syscall_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/syscall_misc.c b/kern/syscall_misc.c index 4d0dd25..8bcacf1 100644 --- a/kern/syscall_misc.c +++ b/kern/syscall_misc.c @@ -150,7 +150,7 @@ static reg_t read_dot_file(va_t buf, int count, int offset) { i++; } /* write extra null byte */ - if (left != 0) { + if (left != 0 && cur == offset) { char nul = '\0'; if (copy_to_user((va_t)buf + written, 1, &nul) != 0) { return (reg_t)-1; |
