udev: event - explicitly don't read() from invalid fd
This fixes CID #1237641.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user