+2001-06-28 Ken Raeburn <raeburn@mit.edu>
+
+ * update_utmp.c (pty_update_utmp): Don't copy host if it's a null
+ pointer.
+
2001-06-21 Ezra Peisach <epeisach@mit.edu>
* libpty.h: Change variable line in prototype to tty_line to
memset(&ent, 0, sizeof(ent));
#ifdef HAVE_STRUCT_UTMP_UT_HOST
- strncpy(ent.ut_host, host, sizeof(ent.ut_host));
+ if (host)
+ strncpy(ent.ut_host, host, sizeof(ent.ut_host));
#endif
strncpy(ent.ut_name, username, sizeof(ent.ut_name));
strncpy(ent.ut_line, line, sizeof(ent.ut_line));