[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Mon Feb 14 12:06:35 MST 2011
The branch, v3-6-test has been updated
via 3493ca6 Return NULL if tevent_add_fd() is passed a negative fd
from 8e8ef45 s4-readline: remove leftover from readline merge.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 3493ca66c6d00417f8ccbef60ab00da01e8af696
Author: Stephen Gallagher <sgallagh at redhat.com>
Date: Mon Feb 14 10:29:49 2011 -0500
Return NULL if tevent_add_fd() is passed a negative fd
Autobuild-User: Simo Sorce <idra at samba.org>
Autobuild-Date: Mon Feb 14 17:47:03 CET 2011 on sn-devel-104
(cherry picked from commit d6a41c2723cda59b3cd6ae9a1e77b62f25067663)
-----------------------------------------------------------------------
Summary of changes:
lib/tevent/tevent_fd.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tevent/tevent_fd.c b/lib/tevent/tevent_fd.c
index c58e8e1..455961b 100644
--- a/lib/tevent/tevent_fd.c
+++ b/lib/tevent/tevent_fd.c
@@ -51,6 +51,12 @@ struct tevent_fd *tevent_common_add_fd(struct tevent_context *ev, TALLOC_CTX *me
{
struct tevent_fd *fde;
+ /* tevent will crash later on select() if we save
+ * a negative file descriptor. Better to fail here
+ * so that consumers will be able to debug it
+ */
+ if (fd < 0) return NULL;
+
fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
--
Samba Shared Repository
More information about the samba-cvs
mailing list