Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2018 22:16:19 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328492 - head/contrib/opie/libopie
Message-ID:  <201801272216.w0RMGJwo057492@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sat Jan 27 22:16:19 2018
New Revision: 328492
URL: https://svnweb.freebsd.org/changeset/base/328492

Log:
  Fix gcc80 -Wsizeof-pointer-memaccess warning.
  
  Obtained from:	DragonFlyBSD (git 56267d362d5769c8df07bf26d5e322610e0d24b4)

Modified:
  head/contrib/opie/libopie/insecure.c

Modified: head/contrib/opie/libopie/insecure.c
==============================================================================
--- head/contrib/opie/libopie/insecure.c	Sat Jan 27 21:25:45 2018	(r328491)
+++ head/contrib/opie/libopie/insecure.c	Sat Jan 27 22:16:19 2018	(r328492)
@@ -135,8 +135,7 @@ int opieinsecure FUNCTION_NOARGS
 	char host[sizeof(utmp.ut_host) + 1];
 	insecure = 1;
 
-	strncpy(host, utmp.ut_host, sizeof(utmp.ut_host));
-	host[sizeof(utmp.ut_host)] = 0;
+	strncpy(host, utmp.ut_host, sizeof(host));
 
 	if (s = strchr(host, ':')) {
 	  int n = s - host;



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