From bb30f44530e127b6737998e939cc723e089c9045 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 24 Nov 2016 09:23:13 -0500 Subject: [PATCH] [mod_extforward] fix crash on invalid IP (fixes #2766) x-ref: "crashes for invalid IP addresses when using mod_extforward" https://redmine.lighttpd.net/issues/2766 --- src/mod_extforward.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod_extforward.c b/src/mod_extforward.c index 4a56f552..60e2e1fc 100644 --- a/src/mod_extforward.c +++ b/src/mod_extforward.c @@ -424,6 +424,7 @@ URIHANDLER_FUNC(mod_extforward_uri_handler) { if (real_remote_addr != NULL) { /* parsed */ sock_addr sock; data_string *forwarded_proto = (data_string *)array_get_element(con->request.headers, "X-Forwarded-Proto"); + sock.plain.sa_family = AF_UNSPEC; if (NULL != forwarded_proto) { if (buffer_is_equal_caseless_string(forwarded_proto->value, CONST_STR_LEN("https"))) {