You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Colm MacCarthaigh <co...@stdlib.net> on 2003/09/01 11:46:23 UTC
[patch] resend seg-fault in listen.c
*mutters something about not liking being responsible for a segfault*
On Tue, Aug 26, 2003 at 12:22:32AM +0100, Colm MacCarthaigh wrote:
> Setting lr to NULL causes a seg-fault if the port was already
> in use, and didnt do what it was intended to anyway since the
> for loop terminates on lr == NULL.
Index: server/listen.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v
retrieving revision 1.91
diff -u -r1.91 listen.c
--- server/listen.c 25 Aug 2003 16:00:49 -0000 1.91
+++ server/listen.c 25 Aug 2003 23:18:54 -0000
@@ -395,8 +395,13 @@
ap_listeners = lr->next;
}
- /* So that previous becomes NULL in the next iteration */
- lr = NULL;
+ /* Allthough we've removed ourselves from the list,
+ * we need to make sure that the next iteration won't
+ * consider "previous" a working IPv6 '::' socket.
+ * Changing the family is enough to make sure the
+ * conditions before make_sock() fail.
+ */
+ lr->bind_addr->family = AF_INET;
continue;
}
--
Colm MacCárthaigh Public Key: colm+pgp@stdlib.net
colm@stdlib.net http://www.stdlib.net/