don't crash when specifying fcgi UNIX sockets to connect to

This commit is contained in:
Omar Polo 2022-11-27 10:05:56 +00:00
parent 872a717687
commit e92efb0d8e
1 changed files with 2 additions and 1 deletions

View File

@ -1178,7 +1178,8 @@ fastcgi_conf(const char *path, const char *port)
if (*f->path == '\0') {
f->id = i;
(void) strlcpy(f->path, path, sizeof(f->path));
(void) strlcpy(f->port, port, sizeof(f->port));
if (port != NULL)
(void) strlcpy(f->port, port, sizeof(f->port));
return i;
}