Closed akoepsel closed 3 years ago
I don't think not logging is the right solution.
Maybe we can have a helper function something like
std::string_view safe_string_view(const char *str)
{
if (str == nullptr)
return std::string_view("(null)");
else
return std::string_view(str);
}
and then use this everywhere where we might have a null pointer? This would replicate printf
's behavior when passing NULL to a %s.
And then squash all the issues in one (or two) commits.
I have changed the target branch to next, to prepare for the merges.
is this still being worked on?
Signed-off-by: Andreas Koepsel andreas.koepsel@bisdn.de
Description
Swapped code blocks on lines 69-71 and 73-76 in src/netlink/netlink-utils.cc to avoid an exception caused by a NULL (string) pointer when the set of initial netlink messages referring to the loopback device is received and baseboxd's verbosity level causes the VLOG stream to call function rtnl_link_get_family(link).
Motivation and Context
How Has This Been Tested?