diff options
author | delphij <delphij@FreeBSD.org> | 2013-09-09 05:01:18 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-09-09 05:01:18 +0000 |
commit | 7917506a10ddaddfb329123334ea2e3590112910 (patch) | |
tree | 1187a91dd578e022c49bb1d9ae6050f55ac4b010 | |
parent | a9b6160aa19a312e651fa2f01b1916b102d32925 (diff) | |
download | FreeBSD-src-7917506a10ddaddfb329123334ea2e3590112910.zip FreeBSD-src-7917506a10ddaddfb329123334ea2e3590112910.tar.gz |
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)
-rw-r--r-- | sys/kern/vfs_mountroot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index e873cf9..322fc9a 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; } |