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)
This commit is contained in:
parent
eb22728291
commit
22ecadc03b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user