[LibOS] Fix incorrect argument check in socketpair

This commit is contained in:
borysp
2020-07-22 17:52:15 +02:00
parent b66fbd1c85
commit 0c7472cbbc
+1 -1
View File
@@ -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))