Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI committed Jan 10, 2021
1 parent 2e9beba commit c6e8b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/userprog/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static bool is_valid_str(const char *str)
for (char *c = str; *c != '\0';)
{
++c;
if (c - str + 2 == PGSIZE || (unsigned)c & PGMASK == 0 && !is_valid_ptr(c))
if (c - str + 2 == PGSIZE || !is_valid_ptr(c))
return false;
}

Expand Down

0 comments on commit c6e8b68

Please sign in to comment.