aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-11-27 10:05:56 +0000
committerOmar Polo <op@omarpolo.com>2022-11-27 10:05:56 +0000
commite92efb0d8ecfd42e3585963c8b66c61f5451cfa9 (patch)
tree2f0275598ed3a3978f9a1e9bc2d5d112591b6143 /parse.y
parent872a717687a377cc02860e44c67dc1934ebfa9cb (diff)
don't crash when specifying fcgi UNIX sockets to connect to
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 12bb4ad..88051af 100644
--- a/parse.y
+++ b/parse.y
@@ -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;
}