The Samba-Bugzilla – Attachment 6246 Details for
Bug 7955
tevent_add_fd() should fail when passed a negative fd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to return NULL on negative file descriptor
0001-Return-NULL-if-tevent_add_fd-is-passed-a-negative-fd.patch (text/plain), 946 bytes, created by
Stephen Gallagher
on 2011-02-14 09:31:23 UTC
(
hide
)
Description:
Patch to return NULL on negative file descriptor
Filename:
MIME Type:
Creator:
Stephen Gallagher
Created:
2011-02-14 09:31:23 UTC
Size:
946 bytes
patch
obsolete
>From 3df90091348c16acd0b30d35b405749c01a6f2e4 Mon Sep 17 00:00:00 2001 >From: Stephen Gallagher <sgallagh@redhat.com> >Date: Mon, 14 Feb 2011 10:29:49 -0500 >Subject: [PATCH] Return NULL if tevent_add_fd() is passed a negative fd > >--- > lib/tevent/tevent_fd.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > >diff --git a/lib/tevent/tevent_fd.c b/lib/tevent/tevent_fd.c >index c58e8e1ab1864c30bdb0be188c2f31fe6939f2fb..455961b67c840db4dc90606b039030eb1ccf308d 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; > >-- >1.7.4 >
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 Raw
Flags:
idra
:
review+
Actions:
View
Attachments on
bug 7955
: 6246