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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user