mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[LibOS] Fix incorrect argument check in socketpair
This commit is contained in:
@@ -152,7 +152,7 @@ int shim_do_socketpair(int domain, int type, int protocol, int* sv) {
|
||||
if (domain != AF_UNIX)
|
||||
return -EAFNOSUPPORT;
|
||||
|
||||
if (type != SOCK_STREAM)
|
||||
if ((type & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) != SOCK_STREAM)
|
||||
return -EPROTONOSUPPORT;
|
||||
|
||||
if (!sv || test_user_memory(sv, 2 * sizeof(int), true))
|
||||
|
||||
Reference in New Issue
Block a user