udev: event - explicitly don't read() from invalid fd
This fixes CID #1237641.
This commit is contained in:
parent
4cd5d5adb6
commit
3f796750b1
|
@ -494,6 +494,9 @@ static void spawn_read(struct udev_event *event,
|
|||
for (i = 0; i < fdcount; i++) {
|
||||
int *fd = (int *)ev[i].data.ptr;
|
||||
|
||||
if (*fd < 0)
|
||||
continue;
|
||||
|
||||
if (ev[i].events & EPOLLIN) {
|
||||
ssize_t count;
|
||||
char buf[4096];
|
||||
|
|
Loading…
Reference in a new issue