|
Tim Waugh |
f792eb |
diff -up cups-1.4.2/scheduler/select.c.CVE-2009-3553 cups-1.4.2/scheduler/select.c
|
|
Tim Waugh |
f792eb |
--- cups-1.4.2/scheduler/select.c.CVE-2009-3553 2009-07-15 00:07:52.000000000 +0100
|
|
Tim Waugh |
f792eb |
+++ cups-1.4.2/scheduler/select.c 2009-11-19 12:30:39.672976150 +0000
|
|
Tim Waugh |
f792eb |
@@ -454,7 +454,7 @@ cupsdDoSelect(long timeout) /* I - Time
|
|
Tim Waugh |
f792eb |
if (fdptr->read_cb && event->filter == EVFILT_READ)
|
|
Tim Waugh |
f792eb |
(*(fdptr->read_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
- if (fdptr->write_cb && event->filter == EVFILT_WRITE)
|
|
Tim Waugh |
f792eb |
+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE)
|
|
Tim Waugh |
f792eb |
(*(fdptr->write_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
release_fd(fdptr);
|
|
Tim Waugh |
f792eb |
@@ -499,7 +499,7 @@ cupsdDoSelect(long timeout) /* I - Time
|
|
Tim Waugh |
f792eb |
if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP)))
|
|
Tim Waugh |
f792eb |
(*(fdptr->read_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
|
|
Tim Waugh |
f792eb |
+ if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
|
|
Tim Waugh |
f792eb |
(*(fdptr->write_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
release_fd(fdptr);
|
|
Tim Waugh |
f792eb |
@@ -590,7 +590,7 @@ cupsdDoSelect(long timeout) /* I - Time
|
|
Tim Waugh |
f792eb |
if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP)))
|
|
Tim Waugh |
f792eb |
(*(fdptr->read_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
|
|
Tim Waugh |
f792eb |
+ if (fdptr->use > 1 && fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
|
|
Tim Waugh |
f792eb |
(*(fdptr->write_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
release_fd(fdptr);
|
|
Tim Waugh |
f792eb |
@@ -645,7 +645,7 @@ cupsdDoSelect(long timeout) /* I - Time
|
|
Tim Waugh |
f792eb |
if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input))
|
|
Tim Waugh |
f792eb |
(*(fdptr->read_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
|
|
Tim Waugh |
f792eb |
+ if (fdptr->use > 1 && fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
|
|
Tim Waugh |
f792eb |
(*(fdptr->write_cb))(fdptr->data);
|
|
Tim Waugh |
f792eb |
|
|
Tim Waugh |
f792eb |
release_fd(fdptr);
|