mirror of
https://gitee.com/openharmony/third_party_libuv
synced 2024-12-26 22:47:13 +00:00
!167 增加判断获取watcher时fd有效性验证
Merge pull request !167 from liaoxingxing/libuvWatchersValid
This commit is contained in:
commit
0b9f18147e
@ -1510,8 +1510,13 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifndef USE_OHOS_DFX
|
||||
assert(fd >= 0);
|
||||
assert((unsigned) fd < loop->nwatchers);
|
||||
#else
|
||||
if (fd < 0 || (unsigned) fd >= loop->nwatchers)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
w = loop->watchers[fd];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user