Author: delphij Date: Thu Oct 1 00:44:45 2015 New Revision: 288434 URL: https://svnweb.freebsd.org/changeset/base/288434
Log: MFC r287927: Use strlcpy() instead of strncpy() because subsequent mkstemps expects the string be nul-terminated. Reviewed by: neel Modified: stable/10/usr.sbin/bhyve/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/acpi.c ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.c Thu Oct 1 00:34:38 2015 (r288433) +++ stable/10/usr.sbin/bhyve/acpi.c Thu Oct 1 00:44:45 2015 (r288434) @@ -790,10 +790,10 @@ basl_open(struct basl_fio *bf, int suffi err = 0; if (suffix) { - strncpy(bf->f_name, basl_stemplate, MAXPATHLEN); + strlcpy(bf->f_name, basl_stemplate, MAXPATHLEN); bf->fd = mkstemps(bf->f_name, strlen(BHYVE_ASL_SUFFIX)); } else { - strncpy(bf->f_name, basl_template, MAXPATHLEN); + strlcpy(bf->f_name, basl_template, MAXPATHLEN); bf->fd = mkstemp(bf->f_name); } _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"