[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32271 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32271 - gnunet/src/util |
Date: |
Mon, 10 Feb 2014 11:15:37 +0100 |
Author: harsha
Date: 2014-02-10 11:15:37 +0100 (Mon, 10 Feb 2014)
New Revision: 32271
Modified:
gnunet/src/util/common_logging.c
Log:
- Allocate buffer large enough to contain UNIX_PATH_MAX size pathnames in case
of UNIX sockets.
Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c 2014-02-10 09:15:00 UTC (rev 32270)
+++ gnunet/src/util/common_logging.c 2014-02-10 10:15:37 UTC (rev 32271)
@@ -1139,7 +1139,14 @@
const char *
GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen)
{
- static char buf[INET6_ADDRSTRLEN + 8];
+#ifndef WINDOWS
+#define LEN GNUNET_MAX ((INET6_ADDRSTRLEN + 8), \
+ (sizeof (struct sockaddr_un) - sizeof (sa_family_t)))
+#else
+#define LEN (INET6_ADDRSTRLEN + 8)
+#endif
+ static char buf[LEN];
+#undef LEN
static char b2[6];
const struct sockaddr_in *v4;
const struct sockaddr_un *un;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32271 - gnunet/src/util,
gnunet <=