1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fix possible system freeze on Mac OS X.

This commit is contained in:
Werner Koch 2009-05-19 22:39:45 +00:00
parent 98f10d74b8
commit 4fa261f8ec
14 changed files with 73 additions and 28 deletions

View file

@ -39,6 +39,7 @@
#include <pth.h>
#define JNLIB_NEED_LOG_LOGV
#define JNLIB_NEED_AFLOCAL
#include "agent.h"
#include <assuan.h> /* Malloc hooks and socket wrappers. */
@ -1457,9 +1458,7 @@ create_server_socket (char *name, int is_ssh, assuan_sock_nonce_t *nonce)
agent_exit (2);
}
strcpy (serv_addr->sun_path, name);
len = (offsetof (struct sockaddr_un, sun_path)
+ strlen (serv_addr->sun_path) + 1);
len = SUN_LEN (serv_addr);
rc = assuan_sock_bind (fd, (struct sockaddr*) serv_addr, len);
if (use_standard_socket && rc == -1 && errno == EADDRINUSE)
{