Skip to content

Commit

Permalink
bugfix:write Bad buf addr should return EINVAL
Browse files Browse the repository at this point in the history
  • Loading branch information
guohao15 authored and xiaoxiang781216 committed Dec 30, 2024
1 parent 5943d62 commit 967d242
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/vfs/fs_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ static ssize_t file_writev_compat(FAR struct file *filep,
continue;
}

if (iov[i].iov_base == NULL)
{
return -EINVAL;
}

buffer = iov[i].iov_base;
remaining = iov[i].iov_len;

Expand Down

0 comments on commit 967d242

Please sign in to comment.