Don't send ttyname to log server if it is NULL.

Otherwise the log server will reject the AcceptMessage because a
NULL string is not allowed.
This commit is contained in:
Todd C. Miller
2022-09-27 15:30:02 -06:00
parent cf95f8d5ae
commit 9150423676

View File

@@ -909,7 +909,9 @@ fmt_info_messages(struct client_closure *closure, struct eventlog *evlog,
fill_str("submithost", evlog->submithost);
/* TODO - submituid */
fill_str("submituser", evlog->submituser);
fill_str("ttyname", evlog->ttyname);
if (evlog->ttyname != NULL) {
fill_str("ttyname", evlog->ttyname);
}
/* Free unused structs. */
while (info_msgs_size > n)