off-by-one

This commit is contained in:
2026-05-19 17:59:25 +01:00
parent 3788f97dbf
commit 0b9189a412
+1 -1
View File
@@ -33,7 +33,7 @@ static void handle_sigchld(int num) {
int open_socket(char * pathname) {
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
if(strlen(pathname) > sizeof(addr.sun_path)) {
if(strlen(pathname) >= sizeof(addr.sun_path)) {
die("pathname \"%s\" is too long to bind as unix socket (max %lu)",
pathname, sizeof(addr.sun_path));
}