Browse Source

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
master
Stefan Bühler 7 years ago
parent
commit
d6fa07c2c7
  1. 2
      src/spawn-fcgi.c

2
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

Loading…
Cancel
Save