Also check whether the data pointers of provided userland iovecs are

actually pointing to userland. This saves checks in the net stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25298 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-05-03 01:04:20 +00:00
parent 7218a9b2ea
commit 3134e71811
+5
View File
@@ -161,6 +161,11 @@ prepare_userland_msghdr(const msghdr* userMessage, msghdr& message,
return B_BAD_ADDRESS;
}
for (int i = 0; i < message.msg_iovlen; i++) {
if (!IS_USER_ADDRESS(vecs[i].iov_base))
return B_BAD_ADDRESS;
}
message.msg_iov = vecs;
} else {
message.msg_iov = NULL;