diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2018-01-28 03:16:54 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2018-01-28 03:16:54 +0000 |
| commit | a645f2a50a4b44444a5da87dc62c0cc743469f9d (patch) | |
| tree | 59d8daedf6bc9e51b2d7a2bcbe9dcd0a2a51a8ee /contrib/opie | |
| parent | 1dff72eb8243fd8ac1542115a205686032da4c75 (diff) | |
Notes
Diffstat (limited to 'contrib/opie')
| -rw-r--r-- | contrib/opie/libopie/insecure.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/opie/libopie/insecure.c b/contrib/opie/libopie/insecure.c index 13d56993a7e3..ba2a9dfaeb5a 100644 --- a/contrib/opie/libopie/insecure.c +++ b/contrib/opie/libopie/insecure.c @@ -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; |
