aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-27 14:29:32 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-27 14:29:32 +0000
commitd5bb67cfa4da130a9949a9b4eb8aba6cb74ea5c7 (patch)
treeed365ca233fa7edfba9551539c4a903f109abef0 /src/libutil/util.cc
parent048e916f6477acc7e57e1d85e832d3efb42ad3f6 (diff)
parentd7c0f094cbcfe1ae4ccc3d54baec00b66ccb1ed0 (diff)
Merge remote-tracking branch 'upstream/master' into optional-derivation-output-storepath
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 93798a765..a0a8ff4d3 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1581,7 +1581,7 @@ AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
- if (path.size() >= sizeof(addr.sun_path))
+ if (path.size() + 1 >= sizeof(addr.sun_path))
throw Error("socket path '%1%' is too long", path);
strcpy(addr.sun_path, path.c_str());