Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Sep 2005 19:50:55 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 84221 for review
Message-ID:  <200509241950.j8OJotuf014179@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=84221

Change 84221 by rwatson@rwatson_peppercorn on 2005/09/24 19:50:45

	Catch another instance of the assumption that the path in a buffer
	returned by vn_fullpath() will be aligned to the beginning of the
	buffer.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#39 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#39 (text+ko) ====

@@ -2413,7 +2413,7 @@
 	 */
 	if (vn_fullpath(td, vp, &retbuf, &freebuf) == 0) {
 		/* Copy and free buffer allocated by vn_fullpath() */
-		bcopy(retbuf, *pathp, MAXPATHLEN);
+		strlcpy(*pathp, retbuf, MAXPATHLEN);
 		free(freebuf, M_TEMP); 
 	} else {
 		(*pathp)[0] = '\0';



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509241950.j8OJotuf014179>