udev: event - explicitly don't read() from invalid fd

This fixes CID #1237641.
This commit is contained in:
Tom Gundersen
2014-09-17 22:19:53 +02:00
parent 4cd5d5adb6
commit 3f796750b1
+3
View File
@@ -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];