kernel/wait_for_objects: Fix copy/paste error in poll().
Seems none of the applications I tested yesterday actually used poll(), because it was completely broken by this. The previous code assigned this variable inside a malloc() call, though, which wasn't all that obvious either.
This commit is contained in:
@@ -1043,7 +1043,7 @@ _user_poll(struct pollfd *userfds, int numFDs, bigtime_t timeout,
|
|||||||
if (!fds.IsValid())
|
if (!fds.IsValid())
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
size_t bytes = 0;
|
const size_t bytes = numFDs * sizeof(struct pollfd);
|
||||||
if (numFDs != 0) {
|
if (numFDs != 0) {
|
||||||
if (userfds == NULL || !IS_USER_ADDRESS(userfds))
|
if (userfds == NULL || !IS_USER_ADDRESS(userfds))
|
||||||
return B_BAD_ADDRESS;
|
return B_BAD_ADDRESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user