Skip to content

[components][lwp]remove extra check in sys_bind #9412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions components/lwp/lwp_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -2880,23 +2880,12 @@ sysret_t sys_bind(int socket, const struct musl_sockaddr *name, socklen_t namele
lwp_get_from_user(&family, (void *)name, 2);
if (family == AF_UNIX)
{
if (!lwp_user_accessable((void *)name, sizeof(struct sockaddr_un)))
{
return -EFAULT;
}

lwp_get_from_user(&un_addr, (void *)name, sizeof(struct sockaddr_un));
ret = bind(socket, (struct sockaddr *)&un_addr, namelen);
}
else if (family == AF_NETLINK)
{
if (!lwp_user_accessable((void *)name, namelen))
{
return -EFAULT;
}

lwp_get_from_user(&sa, (void *)name, namelen);

ret = bind(socket, &sa, namelen);
}
else
Expand Down
Loading