Date: Mon, 11 Jan 2010 20:23:17 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r202111 - user/ed/utmpx/crypto/openssh Message-ID: <201001112023.o0BKNH4u066507@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Mon Jan 11 20:23:17 2010 New Revision: 202111 URL: http://svn.freebsd.org/changeset/base/202111 Log: Also use MIN_SIZEOF() for the line name inside the lastlog code. The use of MIN_SIZEOF() doesn't seem to be used consistenly throughout the code. Modified: user/ed/utmpx/crypto/openssh/loginrec.c Modified: user/ed/utmpx/crypto/openssh/loginrec.c ============================================================================== --- user/ed/utmpx/crypto/openssh/loginrec.c Mon Jan 11 20:07:24 2010 (r202110) +++ user/ed/utmpx/crypto/openssh/loginrec.c Mon Jan 11 20:23:17 2010 (r202111) @@ -1567,9 +1567,10 @@ lastlog_get_entry(struct logininfo *li) memset(&l, '\0', sizeof(l)); ll = &l; } - line_fullname(li->line, ll->ll_line, sizeof(li->line)); + line_fullname(li->line, ll->ll_line, + MIN_SIZEOF(li->line, ll->ll_line)); strlcpy(li->hostname, ll->ll_host, - MIN_SIZEOF(li->hostname, ll->ll_host)); + MIN_SIZEOF(li->hostname, ll->ll_host)); li->tv_sec = ll->ll_tv.tv_sec; li->tv_usec = ll->ll_tv.tv_usec; return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001112023.o0BKNH4u066507>