Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 2020 21:01:47 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358686 - head/sbin/mount_nfs
Message-ID:  <202003052101.025L1lUA082269@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003052101.025L1lUA082269>