Added namelen initialization in getpeername(3) call (CID 979631)
OK kamil@
This commit is contained in:
parent
b1dc5cb72e
commit
805afefc0d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $ */
|
||||
/* $NetBSD: common.c,v 1.7 2015/10/27 14:53:00 shm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
|
||||
@ -29,7 +29,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: common.c,v 1.6 2012/05/19 00:02:44 christos Exp $");
|
||||
__RCSID("$NetBSD: common.c,v 1.7 2015/10/27 14:53:00 shm Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -173,6 +173,7 @@ update_db(int quietlog, int rootlogin, int fflag)
|
||||
int remote;
|
||||
|
||||
hname = (hostname == NULL) ? "?" : hostname;
|
||||
alen = sizeof(ass);
|
||||
if (getpeername(STDIN_FILENO, (struct sockaddr *)&ass, &alen) != -1) {
|
||||
(void)sockaddr_snprintf(assbuf,
|
||||
sizeof(assbuf), "%A (%a)", (void *)&ass);
|
||||
|
Loading…
Reference in New Issue
Block a user