Fix logger use after free
Nodes() points to invalid nodes every time you call RemapLoggedChannel.
Use the logged configuration instead, which is not being destroyed.
Change-Id: Id8f0efc6ac3611fa70a812bb396ef3151919ced2
diff --git a/aos/configuration.cc b/aos/configuration.cc
index f466ee0..f68c543 100644
--- a/aos/configuration.cc
+++ b/aos/configuration.cc
@@ -803,6 +803,8 @@
if (node == nullptr) {
return true;
}
+ CHECK(channel->has_source_node()) << FlatbufferToJson(channel);
+ CHECK(node->has_name()) << FlatbufferToJson(node);
return (CHECK_NOTNULL(channel)->source_node()->string_view() ==
node->name()->string_view());
}