http://code.google.com/p/mcedaemon/source/detail?r=81
Modified:
/trunk/Changelog
/trunk/Makefile
/trunk/ud_socket.c
=======================================
--- /trunk/Changelog Sun Jun 13 09:17:05 2010
+++ /trunk/Changelog Fri Oct 14 21:36:24 2011
@@ -1,4 +1,7 @@
%changelog
+* Fri Oct 14 2011 Tim Hockin <tho...@hockin.org>
+ - Fix innocuous buffer overflow (uds_addr.sun_path). [ud_socket.c]
+
* Sun Jun 13 2010 Tim Hockin <tho...@hockin.org>
- Bump to 2.0.4 for release.
=======================================
--- /trunk/ud_socket.c Tue Apr 7 21:07:16 2009
+++ /trunk/ud_socket.c Fri Oct 14 21:36:24 2011
@@ -34,7 +34,7 @@
/* setup address struct */
memset(&uds_addr, 0, sizeof(uds_addr));
uds_addr.sun_family = AF_UNIX;
- strcpy(uds_addr.sun_path, name);
+ strncpy(uds_addr.sun_path, name, sizeof(uds_addr.sun_path));
/* bind it to the socket */
r = bind(fd, (struct sockaddr *)&uds_addr, sizeof(uds_addr));