summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-03-07 13:58:25 +0000
committerStefan Bühler <stbuehler@web.de>2009-03-07 13:58:25 +0000
commited4c3115cfd524cc1b2d523e4458edc843ff495e (patch)
treedccf1a452102fe929b27e30d278f1e223b8c9f94
parent2dcbf18b4eccb6a3acb949d70e276416ca506d44 (diff)
downloadlighttpd-git-lighttpd-1.4.22.tar.gz
Fix segfault if siginfo_t* is NULL in sigaction handler (fixes #1926)lighttpd-1.4.22
git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2409 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--NEWS1
-rw-r--r--src/server.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index a6e95321..27576c24 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ NEWS
* Treat EPIPE as connection-closed error in network_freebsd_sendfile.c (another fix from #1913)
* Fix useless redirection of stderr in mod_rrdtool, as it gets redirected to /dev/null later. (fixes #1922)
* Fix some problems with more strict compilers (#1923)
+ * Fix segfault if siginfo_t* is NULL in sigaction handler (fixes #1926)
- 1.4.21 - 2009-02-16
diff --git a/src/server.c b/src/server.c
index 11a070a6..ee56b664 100644
--- a/src/server.c
+++ b/src/server.c
@@ -75,8 +75,11 @@ static volatile siginfo_t last_sigterm_info;
static volatile siginfo_t last_sighup_info;
static void sigaction_handler(int sig, siginfo_t *si, void *context) {
+ static siginfo_t empty_siginfo;
UNUSED(context);
+ if (!si) si = &empty_siginfo;
+
switch (sig) {
case SIGTERM:
srv_shutdown = 1;