aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_mountroot.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-09-09 05:01:18 +0000
committerXin LI <delphij@FreeBSD.org>2013-09-09 05:01:18 +0000
commit22ecadc03b1806b21d70d91cd45283a44df1c3f6 (patch)
tree1187a91dd578e022c49bb1d9ae6050f55ac4b010 /sys/kern/vfs_mountroot.c
parenteb22728291e43611facd37bb1bf40716423d6f31 (diff)
downloadsrc-22ecadc03b1806b21d70d91cd45283a44df1c3f6.tar.gz
src-22ecadc03b1806b21d70d91cd45283a44df1c3f6.zip
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@gmail.com> MFC after: 3 days Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=255412
Diffstat (limited to 'sys/kern/vfs_mountroot.c')
-rw-r--r--sys/kern/vfs_mountroot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index e873cf93907e..322fc9a00c21 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -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;
}