From: Nick Mathewson Date: Thu, 21 May 2009 20:59:09 +0000 (+0000) Subject: Disallow backlog==0 in evconnlistener_new_bind(). X-Git-Tag: release-2.0.3-alpha~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e3ea82ee6f89d9d7035aec388c766e235752f79;p=libevent Disallow backlog==0 in evconnlistener_new_bind(). svn:r1300 --- diff --git a/listener.c b/listener.c index 0f1f9888..e31279c8 100644 --- a/listener.c +++ b/listener.c @@ -94,6 +94,8 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb, void *ptr int on = 1; int family = sa ? sa->sa_family : AF_UNSPEC; + if (backlog == 0) + return NULL; fd = socket(family, SOCK_STREAM, 0); if (fd == -1) return NULL;