svn commit: r328506 - head/contrib/opie/libopie
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Jan 28 03:16:55 UTC 2018
Author: pfg
Date: Sun Jan 28 03:16:54 2018
New Revision: 328506
URL: https://svnweb.freebsd.org/changeset/base/328506
Log:
Revert r328492:
"Fix gcc80 -Wsizeof-pointer-memaccess warning."
The warning is bogus: GCC8 only looks at the size of the destination.
We shouldn't be fixing imaginary problems, so perhaps its better to deal
with this later on by disabling such warnings.
Pointed out by: ed, bde
Modified:
head/contrib/opie/libopie/insecure.c
Modified: head/contrib/opie/libopie/insecure.c
==============================================================================
--- head/contrib/opie/libopie/insecure.c Sun Jan 28 03:07:22 2018 (r328505)
+++ head/contrib/opie/libopie/insecure.c Sun Jan 28 03:16:54 2018 (r328506)
@@ -135,7 +135,8 @@ int opieinsecure FUNCTION_NOARGS
char host[sizeof(utmp.ut_host) + 1];
insecure = 1;
- strncpy(host, utmp.ut_host, sizeof(host));
+ strncpy(host, utmp.ut_host, sizeof(utmp.ut_host));
+ host[sizeof(utmp.ut_host)] = 0;
if (s = strchr(host, ':')) {
int n = s - host;
More information about the svn-src-all
mailing list