aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2014-06-03 11:17:41 +0000
committerStefan Bühler <stbuehler@web.de>2014-06-03 11:17:41 +0000
commitd6fa07c2c70b1a571d0b4ba4c4e9ed26dbd6fbf7 (patch)
tree83c28fb0d1ef79cf612d3ae5432e32f5a67281cb
parenta032343dbb877a4cc46259a53460dcb7b1faa3fa (diff)
downloadspawn-fcgi-d6fa07c2c70b1a571d0b4ba4c4e9ed26dbd6fbf7.tar.gz
spawn-fcgi-d6fa07c2c70b1a571d0b4ba4c4e9ed26dbd6fbf7.zip
Check unix socket path length again to silence coverity
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/spawn-fcgi/trunk@67 4a9f3682-ca7b-49a8-9a55-ba4640e46f83
-rw-r--r--src/spawn-fcgi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/spawn-fcgi.c b/src/spawn-fcgi.c
index 34a041e..bc583cf 100644
--- a/src/spawn-fcgi.c
+++ b/src/spawn-fcgi.c
@@ -115,6 +115,8 @@ static int bind_socket(const char *addr, unsigned short port, const char *unixso
memset(&fcgi_addr_un, 0, sizeof(fcgi_addr_un));
fcgi_addr_un.sun_family = AF_UNIX;
+ /* already checked in main() */
+ if (strlen(unixsocket) > sizeof(fcgi_addr_un.sun_path) - 1) return -1;
strcpy(fcgi_addr_un.sun_path, unixsocket);
#ifdef SUN_LEN