aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/derivations.cc1
-rw-r--r--src/libutil/util.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 157fc1db1..c88bb3c6d 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -24,6 +24,7 @@ std::optional<StorePath> DerivationOutput::pathOpt(const Store & store, std::str
}, output);
}
+
bool derivationIsCA(DerivationType dt) {
switch (dt) {
case DerivationType::Regular: return false;
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());