svn commit: r255485 - stable/9/sys/kern
Xin LI
delphij at FreeBSD.org
Thu Sep 12 00:46:33 UTC 2013
Author: delphij
Date: Thu Sep 12 00:46:32 2013
New Revision: 255485
URL: http://svnweb.freebsd.org/changeset/base/255485
Log:
MFC r255412:
In r243868, the error message buffer errmsg have been changed from
an on-stack array to a pointer and therefore sizeof(errmsg) would
become 4 or 8 bytes depending on the architecture.
Fix this by using ERRMSGL in place of sizeof().
Submitted by: J David <j.david.lists at gmail.com>
Modified:
stable/9/sys/kern/vfs_mountroot.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/kern/vfs_mountroot.c
==============================================================================
--- stable/9/sys/kern/vfs_mountroot.c Thu Sep 12 00:23:09 2013 (r255484)
+++ stable/9/sys/kern/vfs_mountroot.c Thu Sep 12 00:46:32 2013 (r255485)
@@ -710,7 +710,7 @@ parse_mount(char **conf)
errmsg = malloc(ERRMSGL, M_TEMP, M_WAITOK | M_ZERO);
if (vfs_byname(fs) == NULL) {
- strlcpy(errmsg, "unknown file system", sizeof(errmsg));
+ strlcpy(errmsg, "unknown file system", ERRMSGL);
error = ENOENT;
goto out;
}
More information about the svn-src-stable-9
mailing list