[mcedaemon] r83 committed - NIt

2 views
Skip to first unread message

mced...@googlecode.com

unread,
Oct 17, 2011, 11:07:46 PM10/17/11
to mced-...@googlegroups.com
Revision: 83
Author: thockin
Date: Mon Oct 17 20:07:28 2011
Log: NIt

http://code.google.com/p/mcedaemon/source/detail?r=83

Modified:
/trunk/ud_socket.c

=======================================
--- /trunk/ud_socket.c Fri Oct 14 21:36:24 2011
+++ /trunk/ud_socket.c Mon Oct 17 20:07:28 2011
@@ -34,7 +34,8 @@
/* setup address struct */
memset(&uds_addr, 0, sizeof(uds_addr));
uds_addr.sun_family = AF_UNIX;
- strncpy(uds_addr.sun_path, name, sizeof(uds_addr.sun_path));
+ strncpy(uds_addr.sun_path, name, sizeof(uds_addr.sun_path)-1);
+ uds_addr.sun_path[sizeof(uds_addr.sun_path)-1] = '\0';

/* bind it to the socket */
r = bind(fd, (struct sockaddr *)&uds_addr, sizeof(uds_addr));

Reply all
Reply to author
Forward
0 new messages