[Xcb] [PATCH] Fail if fd is too big and poll() is not available
Jamey Sharp
jamey at minilop.net
Sun Mar 28 10:36:50 PDT 2010
2010/3/28 Rémi Denis-Courmont <remi at remlab.net>:
> On Saturday 27 March 2010 02:20:07 Jamey Sharp, you wrote:
>> Makes sense to me, except... Shouldn't the test for a too-big fd be in
>> xcb_conn.c somewhere instead? An application might open the connection
>> itself, bypassing the code in util.
>
> Good point. Hopefully corrected patch.
Yeah, that's good, but now it doesn't seem right to close a file
descriptor that we didn't open. Which makes me realize that
xcb_connect_to_display_with_auth_info probably needs to close fd on
its error paths.
Since xcb_connect_to_fd already closes fd on failure to allocate
memory, let's commit this patch (can I get a Signed-off-by from you?)
and fix the rest separately.
Reviewed-by: Jamey Sharp <jamey at minilop.net>
Jamey
More information about the Xcb
mailing list