]> granicus.if.org Git - libevent/commitdiff
Disallow backlog==0 in evconnlistener_new_bind().
authorNick Mathewson <nickm@torproject.org>
Thu, 21 May 2009 20:59:09 +0000 (20:59 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 21 May 2009 20:59:09 +0000 (20:59 +0000)
svn:r1300

listener.c

index 0f1f988809b26ff273b9c7f0e546f298277dc0e8..e31279c8017840e0ab7281bcdd6ad08f2c732d69 100644 (file)
@@ -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;