commit
2df39a7e51
|
@ -242,6 +242,11 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (ev == NULL) {
|
||||
set_errno(EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
case EPOLL_CTL_ADD:
|
||||
ret = CheckFdExist(epHead, fd);
|
||||
|
@ -304,7 +309,7 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, int timeout
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (maxevents <= 0) {
|
||||
if ((maxevents <= 0) || (evs == NULL)) {
|
||||
set_errno(EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -2570,7 +2570,9 @@ int SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
CPY_FROM_USER(exceptfds);
|
||||
DUP_FROM_USER(timeout, sizeof(struct timeval));
|
||||
|
||||
((struct timeval *)timeout)->tv_usec = timeout->tv_nsec / 1000; /* 1000, convert ns to us */
|
||||
if (timeout != NULL) {
|
||||
((struct timeval *)timeout)->tv_usec = timeout->tv_nsec / 1000; /* 1000, convert ns to us */
|
||||
}
|
||||
|
||||
if (data != NULL) {
|
||||
retVal = LOS_ArchCopyFromUser(&(setl.sig[0]), (int *)((UINTPTR)data[0]), sizeof(sigset_t));
|
||||
|
|
Loading…
Reference in New Issue