[packages/lighttpd] - rel 2; fix fastcgi segfault if no host is set

arekm arekm at pld-linux.org
Sun Mar 18 19:17:09 CET 2018


commit 3f2147dc5167085e15f7b661dd0c9f2adc9b6af9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Mar 18 19:17:00 2018 +0100

    - rel 2; fix fastcgi segfault if no host is set

 lighttpd-bug-2876.patch | 31 +++++++++++++++++++++++++++++++
 lighttpd.spec           |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/lighttpd.spec b/lighttpd.spec
index 9e50f51..5b4761c 100644
--- a/lighttpd.spec
+++ b/lighttpd.spec
@@ -40,7 +40,7 @@ Summary:	Fast and light HTTP server
 Summary(pl.UTF-8):	Szybki i lekki serwer HTTP
 Name:		lighttpd
 Version:	1.4.49
-Release:	1
+Release:	2
 License:	BSD
 Group:		Networking/Daemons/HTTP
 Source0:	https://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.xz
@@ -120,6 +120,7 @@ Patch3:		%{name}-branding.patch
 Patch4:		systemd.patch
 Patch6:		test-port-setup.patch
 Patch7:		env-documentroot.patch
+Patch8:		lighttpd-bug-2876.patch
 URL:		https://www.lighttpd.net/
 %{?with_geoip:BuildRequires:	GeoIP-devel}
 %{?with_xattr:BuildRequires:	attr-devel}
diff --git a/lighttpd-bug-2876.patch b/lighttpd-bug-2876.patch
new file mode 100644
index 0000000..b1c03e1
--- /dev/null
+++ b/lighttpd-bug-2876.patch
@@ -0,0 +1,31 @@
+From e21906b3b41cda3cefebcc8b96ae6ad08549e504 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss at gluelogic.com>
+Date: Thu, 15 Mar 2018 23:21:37 -0400
+Subject: [PATCH] [core] fix crash if 'host' empty in config (fixes #2876)
+
+x-ref:
+ "segfault with fastcgi app"
+  https://redmine.lighttpd.net/issues/2876
+---
+ src/gw_backend.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/gw_backend.c b/src/gw_backend.c
+index dbef6328..7b5ef190 100644
+--- a/src/gw_backend.c
++++ b/src/gw_backend.c
+@@ -1399,8 +1399,12 @@ int gw_set_defaults_backend(server *srv, gw_plugin_data *p, data_unset *du, size
+                     host->port = 80;
+                 }
+ 
+-                host->family = (!buffer_string_is_empty(host->host)
+-                                && NULL != strchr(host->host->ptr, ':'))
++                if (buffer_string_is_empty(host->host)) {
++                    buffer_copy_string_len(host->host,
++                                           CONST_STR_LEN("127.0.0.1"));
++                }
++
++                host->family = (NULL != strchr(host->host->ptr, ':'))
+                   ? AF_INET6
+                   : AF_INET;
+             }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lighttpd.git/commitdiff/3f2147dc5167085e15f7b661dd0c9f2adc9b6af9



More information about the pld-cvs-commit mailing list