projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5841f72
)
Added size check for unix path configs
author
Matthias Wachs
<wachs@net.in.tum.de>
Fri, 19 Nov 2010 16:11:58 +0000
(16:11 +0000)
committer
Matthias Wachs
<wachs@net.in.tum.de>
Fri, 19 Nov 2010 16:11:58 +0000
(16:11 +0000)
src/util/service.c
patch
|
blob
|
history
diff --git
a/src/util/service.c
b/src/util/service.c
index 3423b58cb56d717d4f4d52e586a621238a161c79..79b21e065fb0f9883974010ba6367ef83c0c7f1b 100644
(file)
--- a/
src/util/service.c
+++ b/
src/util/service.c
@@
-867,6
+867,14
@@
GNUNET_SERVICE_get_server_addresses (const char *serviceName,
&unixpath));
/* probe UNIX support */
+ struct sockaddr_un s_un;
+ if (strlen(unixpath) >= sizeof(s_un.sun_path))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("UNIXPATH `%s' too long, maximum length is %llu\n"),unixpath, sizeof(s_un.sun_path));
+ }
+ /* FIXME: Perhaps add an assertion or a break??? */
+
desc = GNUNET_NETWORK_socket_create (AF_UNIX, SOCK_STREAM, 0);
if (NULL == desc)
{