Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 704152 Details for
Bug 917007
FAMPending() can crash due to fd_set overflow
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Use poll() instead of select().
gamin-use-poll.patch (text/plain), 975 bytes, created by
Luke Elliott
on 2013-03-01 12:35:48 UTC
(
hide
)
Description:
Use poll() instead of select().
Filename:
MIME Type:
Creator:
Luke Elliott
Created:
2013-03-01 12:35:48 UTC
Size:
975 bytes
patch
obsolete
>diff -aur gamin-0.1.7-orig/libgamin/gam_api.c gamin-0.1.7/libgamin/gam_api.c >--- gamin-0.1.7-orig/libgamin/gam_api.c 2013-02-28 16:44:13.000000000 +0000 >+++ gamin-0.1.7/libgamin/gam_api.c 2013-02-28 16:55:31.000000000 +0000 >@@ -20,6 +20,8 @@ > #include "gam_fork.h" > #include "gam_error.h" > >+#include <poll.h> >+ > #define TEST_DEBUG > > #define MAX_RETRIES 25 >@@ -484,8 +486,7 @@ > static int > gamin_data_available(int fd) > { >- fd_set read_set; >- struct timeval tv; >+ struct pollfd poll_fd; > int avail; > > if (fd < 0) { >@@ -495,12 +496,11 @@ > GAM_DEBUG(DEBUG_INFO, "Checking data available on %d\n", fd); > > retry: >- FD_ZERO(&read_set); >- FD_SET(fd, &read_set); >- tv.tv_sec = 0; >- tv.tv_usec = 0; >+ poll_fd.fd = fd; >+ poll_fd.events = POLLIN; >+ poll_fd.revents = 0; > >- avail = select(fd + 1, &read_set, NULL, NULL, &tv); >+ avail = poll(&poll_fd, 1, 0); > if (avail < 0) { > if (errno == EINTR) > goto retry;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 917007
: 704152