From: martynas Date: Thu, 9 Jan 2014 05:04:03 +0000 (+0000) Subject: Use destination bound rather than the source bound for out_line and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d9466f66789641ff2095b16507caaa1997b92a29;p=openbsd Use destination bound rather than the source bound for out_line and out_name. OK millert@. --- diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index a85e6cbca07..edc0de66196 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -374,9 +374,9 @@ timer(void) for (i = 0; i < utmpent; i++) if (utmp[i].ut_name[0]) { memcpy(we->we_utmp.out_line, utmp[i].ut_line, - sizeof(utmp[i].ut_line)); + sizeof(we->we_utmp.out_line)); memcpy(we->we_utmp.out_name, utmp[i].ut_name, - sizeof(utmp[i].ut_name)); + sizeof(we->we_utmp.out_line)); we->we_utmp.out_time = htonl(utmp[i].ut_time); if (we >= wlast) break;