2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Add missing NULL checks for mandatory fields in protobuf messages.

Also no longer reject an InfoMessage with an unknown value_case,
just log and ignore it.
This commit is contained in:
Todd C. Miller
2022-09-28 08:47:25 -06:00
parent 9150423676
commit e6f2ad0ed6
4 changed files with 111 additions and 99 deletions

View File

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