Author: pjd Date: Mon Aug 9 20:16:52 2010 New Revision: 211116 URL: http://svn.freebsd.org/changeset/base/211116
Log: Linux has no strlcpy(). Modified: head/tools/regression/fstest/fstest.c Modified: head/tools/regression/fstest/fstest.c ============================================================================== --- head/tools/regression/fstest/fstest.c Mon Aug 9 19:53:24 2010 (r211115) +++ head/tools/regression/fstest/fstest.c Mon Aug 9 20:16:52 2010 (r211116) @@ -541,7 +541,8 @@ call_syscall(struct syscall_desc *scall, struct sockaddr_un sunx; sunx.sun_family = AF_UNIX; - strlcpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path)); + strncpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; rval = socket(AF_UNIX, SOCK_STREAM, 0); if (rval < 0) break; @@ -553,7 +554,8 @@ call_syscall(struct syscall_desc *scall, struct sockaddr_un sunx; sunx.sun_family = AF_UNIX; - strlcpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path)); + strncpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; rval = socket(AF_UNIX, SOCK_STREAM, 0); if (rval < 0) break; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"