svn commit: r328492 - head/contrib/opie/libopie

Pedro F. Giffuni pfg at FreeBSD.org
Sat Jan 27 22:16:20 UTC 2018


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;


More information about the svn-src-head mailing list