off-by-one
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user