Date: Mon, 9 Sep 2013 05:01:19 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255412 - head/sys/kern Message-ID: <201309090501.r8951J9V044838@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Sep 9 05:01:18 2013 New Revision: 255412 URL: http://svnweb.freebsd.org/changeset/base/255412 Log: 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) Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Mon Sep 9 04:38:57 2013 (r255411) +++ head/sys/kern/vfs_mountroot.c Mon Sep 9 05:01:18 2013 (r255412) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309090501.r8951J9V044838>