Date: Thu, 12 Sep 2013 00:46:32 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255485 - stable/9/sys/kern Message-ID: <201309120046.r8C0kWDe076977@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309120046.r8C0kWDe076977>