mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into better-ca-parse-errors
This commit is contained in:
commit
1d7d94ceea
19 changed files with 206 additions and 265 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue