Ralf Habacker (@rhabacker) commented about server/sock.c:
if (!(unix_path = mem_alloc( unix_path_len + 1 )))
return;
memcpy( unix_path, (char *)(¶ms->addr) + sizeof(struct WS_sockaddr_un), unix_path_len );
unix_path[unix_path_len] = '\0';
base_name = strrchr(unix_path, '/');
if (base_name)
{
if (base_name != unix_path)
(++base_name)[-1] = '\0';
}
else
base_name = unix_path;
if (chdir( unix_path ) == -1)
chdir() is also used here.