svn commit: r358686 - head/sbin/mount_nfs

Gleb Smirnoff glebius at FreeBSD.org
Thu Mar 5 21:01:48 UTC 2020


Author: glebius
Date: Thu Mar  5 21:01:47 2020
New Revision: 358686
URL: https://svnweb.freebsd.org/changeset/base/358686

Log:
  Align the buffer to the alignment of the structure we expect.
  
  Submitted by:	Slawa Olhovchenkov <slw zxy.spb.ru>

Modified:
  head/sbin/mount_nfs/mount_nfs.c

Modified: head/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.c	Thu Mar  5 20:53:43 2020	(r358685)
+++ head/sbin/mount_nfs/mount_nfs.c	Thu Mar  5 21:01:47 2020	(r358686)
@@ -514,7 +514,7 @@ sec_num_to_name(int flavor)
 static time_t
 rtm_ifinfo_sleep(time_t sec)
 {
-	char buf[2048];
+	char buf[2048] __aligned(__alignof(struct if_msghdr));
 	fd_set rfds;
 	struct timeval tv, start;
 	ssize_t nread;


More information about the svn-src-head mailing list